docs: add missing playerReadyEvent call

This commit is contained in:
richard 2026-06-21 18:54:46 -07:00 • committed by GitHub
parent fdb506dc23
commit b05f3a9de6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -700,7 +700,7 @@ client.addSignals({
status = store.setStatus,
timer = store.timerAtom,
-- Signals unique to a player should also have a key unique to
-- that player, to avoid overwriting other synced signals
-- that player, to avoid name collisions
[`inventory-{Players.LocalPlayer.UserId}`] = setInventory,
})
@ -709,6 +709,9 @@ syncEvent.OnClientEvent:Connect(function(updates)
client.patch(updates)
end)
-- Notify the server that the client is ready to receive updates
playerReadyEvent:FireServer()
-- The signals will now update to match the server's state
subscribe(getInventory, function(inventory)
print("My inventory is", table.concat(inventory))
@ -844,7 +847,7 @@ client.addSignals({
status = store.setStatus,
timer = store.timerAtom,
-- Signals unique to a player should also have a key unique to
-- that player, to avoid overwriting other synced signals
-- that player, to avoid name collisions
[`inventory-{Players.LocalPlayer.UserId}`] = clientStore.setInventory,
})
```