What does this mean its a local script inside a gui
repeat wait(.1) until game.Players.LocalPlayer
What does this mean its a local script inside a gui
repeat wait(.1) until game.Players.LocalPlayer
This script means that the code runs until it finds a player that has joined the game in 0.1 seconds. Until then, it won't run any code after that line. This script would work for every player in game if you change
wait(.1) [[-- To --]]
wait()
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
that section of code waits till the localplayer exists, used as a delay to not get errors such as "attempt to index nil localplayer".. or certain descendants..
I have made a sandbox game but I wasn't sure if this was the reason why only 1 person can use the sandbox at one time
Would this sctipt work for every player on the server