:Request
Requests data from the server for a specific realKey on a one-time basis. The server will check authorization before sending the data. The received data is also cached locally.
DataReplicator:Request(realKey: string)
realKey: stringThe key of the data to update. The key must have been previously created or registered.
any | nil - The data received from the server, or nil if the request failed (e.g., timed out, was denied by the server, or the key doesn't exist).
-- Requesting a table of game settings from the server.
local gameSettings = DataReplicator:Request("Public_GameSettings")
if gameSettings then
print("Game settings loaded successfully. Volume is:", gameSettings.Volume)
-- Apply settings to the game...
else
warn("Could not retrieve game settings from the server.")
endLast updated