|
| 28 Dec 2015 01:52 PM |
Is there a way to make the scripts wait for player to load in Roblox? Can you plz give me the code?? My scripts load before the character when I join the server. So my run script is looking for something that's not even there yet |
|
|
| Report Abuse |
|
|
|
| 28 Dec 2015 01:54 PM |
| repeat wait() until player.Character. |
|
|
| Report Abuse |
|
|
|
| 28 Dec 2015 01:55 PM |
| this works for all players?? |
|
|
| Report Abuse |
|
|
|
| 28 Dec 2015 01:57 PM |
Depends on how you get the player.
if it's in a localscript then it will be just for the local player.
If it's in a for loop getting all the players then it will work for all the players. |
|
|
| Report Abuse |
|
|
|
| 28 Dec 2015 02:03 PM |
I figured it out!
repeat wait() local plr = game.Players.LocalPlayer print("nope") until plr ~= nil print("gotcha!") |
|
|
| Report Abuse |
|
|
|
| 28 Dec 2015 02:06 PM |
| nvm, I tried testing it in server. But it kept printing nope |
|
|
| Report Abuse |
|
|