Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

What someone tell me what this function its in a local script?

What does this mean its a local script inside a gui

repeat wait(.1) until game.Players.LocalPlayer

3 comments

1

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..

0

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

0

Would this sctipt work for every player on the server

1 answer

✓ Accepted answer

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.