I am having problems lately with my scripts because I have to add a wait before using my scripts. I was wondering if there was a way to wait for the player to load before the script starts.
I think it would start like this:
repeat wait() until
After until, I have no idea what comes next. Help?
You need to wait (usually) for the presence of their Character (since this is one of the last things to load).
player = game.Players.LocalPlayer -- Don't have to wait for this! repeat wait() until player.Character -- Do have to wait for their Character!
local player = game.Players.LocalPlayer repeat wait() until player.Character
Similarly, you can replace line 2 with this:
repeat wait() until player.Character~=nil