|
| 05 Jan 2014 04:04 PM |
game.Players.PlayerAdded:connect(function(p) p:WaitForChild("PlayerGui"):WaitForChild("LastManStanding") end)
it just simply doesn't wait for those to exist and just skips them
|
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 05 Jan 2014 07:06 PM |
| Do ya'll need any other info to help me or? |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 05 Jan 2014 07:06 PM |
| WaitForChild() can be buggy. |
|
|
| Report Abuse |
|
|
|
| 05 Jan 2014 07:17 PM |
| any other method of waiting for a player to be completely loaded before continuing a script? |
|
|
| Report Abuse |
|
|
|
| 05 Jan 2014 07:17 PM |
Use repeat wait() until p.PlayerGui:findFirstChild("LastManStanding")
-insane-enasni- |
|
|
| Report Abuse |
|
|
|
| 05 Jan 2014 07:24 PM |
@insane
Output said PlayerGui is a nil value
so I tried
repeat wait() until p:findFirstChild("PlayerGui")
and output said attempt to call method "findFirstChild" is a nil value |
|
|
| Report Abuse |
|
|
|
| 05 Jan 2014 07:25 PM |
| wait derp it's FindFirstChild |
|
|
| Report Abuse |
|
|
| |
|
Azureous
|
  |
| Joined: 29 Jan 2012 |
| Total Posts: 25287 |
|
| |
|
|
| 05 Jan 2014 08:09 PM |
@Azure
That doesn't work, because i need it to keep waiting until they exist
not just check one time and if not then stop everything |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 05 Jan 2014 08:15 PM |
repeat wait() until p:findFirstChild("PlayerGui") and p.PlayerGui:findFirstChild("LastManStanding") |
|
|
| Report Abuse |
|
|
|
| 05 Jan 2014 08:18 PM |
Ok so is this all I need?
p = game.Players:GetPlayers() repeat wait() until p:findFirstChild("PlayerGui") and p.PlayerGui:findFirstChild("LastManStanding") |
|
|
| Report Abuse |
|
|
| |
|
VilleSlay
|
  |
| Joined: 14 May 2011 |
| Total Posts: 1405 |
|
|
| 05 Jan 2014 08:43 PM |
GetPlayers() creates a table. You would have to loop through the table unless you want the script to wait for every single player's PlayerGui.
~~> Ville <~~ |
|
|
| Report Abuse |
|
|
|
| 05 Jan 2014 10:41 PM |
I do want to wait for every player's PlayerGui to load
How do I go about doing that |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
Scriptos
|
  |
| Joined: 17 Jun 2008 |
| Total Posts: 2900 |
|
|
| 06 Jan 2014 02:08 PM |
for i,v in pairs(game.Players:GetChildren()) do if (v:findFirstChild("PlayerGui")) then --Code here. end end; |
|
|
| Report Abuse |
|
|
Scriptos
|
  |
| Joined: 17 Jun 2008 |
| Total Posts: 2900 |
|
|
| 06 Jan 2014 02:10 PM |
Oops, sorry. Didn't read the whole thing.
game.Players.PlayerAdded:connect(function(p) repeat wait() until p:findFirstChild("PlayerGui"):findFirstChild("LastManStanding"); --code end); |
|
|
| Report Abuse |
|
|
|
| 06 Jan 2014 02:20 PM |
@scriptos
No error, but nothing happened, as in it didn't carry on the script |
|
|
| Report Abuse |
|
|
EcIiptic
|
  |
| Joined: 12 Aug 2009 |
| Total Posts: 13737 |
|
|
| 06 Jan 2014 02:23 PM |
TheInnovative
If you are using the PlayerAdded event on play solo test then it won't work.
Try going to an actual server and test it.
If that's not it, then I have no idea. |
|
|
| Report Abuse |
|
|
|
| 06 Jan 2014 02:27 PM |
You can try :WaitForDataReady()
If I'm not mistaken, the player is already fully loaded before roblox readies player data. |
|
|
| Report Abuse |
|
|