:WaitForData

Waits for data associated with realKey to become available in the local cache, up to an optional timeout.

This function is an essential utility for initial setup scripts. It efficiently waits for critical data to arrive without needing to write your own polling loops. Internally, it implicitly calls :Listen() if needed, ensuring a listener is active for the key.


DataReplicator:WaitForData(realKey: string, timeout?: number)


  • realKey: string

    The original data key you are waiting for.

  • timeout: number? (Optional)

    The maximum time to wait in seconds. Defaults to 5 seconds.

Last updated