Suppose I needed to run some code on both the client and server (different code for each) whenever a player’s character respawned. I also needed the client code to wait for the server code to finish running first and/or to fetch some information from it, so to simplify my code I decided to go like this:
- In the server, run code when
CharacterAddedfires, then fire a remote event
- The client waits for the server to fire the remote event rather than using
The question is, is the remote event signal guaranteed to arrive the client after the new character has replicated (as if I used
CharacterAdded), even if the server code doesn’t yield before firing the event?
Edit: To make what I meant to ask more clear: will the signal always arrive after the character was replicated or can it arrive while the client still sees the previous character? I know it is guaranteed to arrive at some point.