I have a script that spawns some templates to client-side once a player joins the game (players are assigned their own lots and my kitbashed models are too complex to load them in for every single player). I am using BroadcastToPlayer on the server side to tell the client script to load in those props to the player's assigned lot once they join the game.
Everything works great, except the client script is loading in too slow to receive the broadcast at the time the game starts up. I can fix this by adding Task.Wait(5) before the broadcast so that the client script has time to load up first. I was mostly just using this for troubleshooting to make sure it actually works.
My question is - is there a better way to get my server script to wait for the client script before sending the broadcast to it? Picking an arbitrary amount of time to wait seems unreliable since I can't predict how long it will take for each client to load the script. Both scripts are in the hierarchy, if that matters.