| |
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
| |
|
UmmmNoah
|
  |
| Joined: 01 Jan 2014 |
| Total Posts: 4 |
|
| |
|
Kingmouli
|
  |
| Joined: 28 Sep 2012 |
| Total Posts: 1292 |
|
| |
|
|
| 04 Jan 2014 04:03 PM |
| And how exactly do I use it? |
|
|
| Report Abuse |
|
|
|
| 04 Jan 2014 04:05 PM |
:WaitForDataReady()
repeat wait() until BLA.DataReady == true
:WaitForChild()
|
|
|
| Report Abuse |
|
|
|
| 04 Jan 2014 04:06 PM |
what...
Can you give me a common example? |
|
|
| Report Abuse |
|
|
|
| 04 Jan 2014 04:07 PM |
Script inside the StarterPack
Player = script.Parent.Parent
Player:WaitForDataReady
-- repeat wait() until Player.DataReady == true -- repeat wait() until Player.Character
I'm sure there are plenty more but these are the main ones I use. |
|
|
| Report Abuse |
|
|
|
| 04 Jan 2014 04:11 PM |
Ok I understand those except when it gets here
-- repeat wait() until Player.DataReady == true -- repeat wait() until Player.Character
I know the first line waits for the data but what does the second line wait for? For character to exist? I just need it to wait for the PlayerGui to be ready |
|
|
| Report Abuse |
|
|
|
| 04 Jan 2014 04:20 PM |
| so all I need is DataReady? |
|
|
| Report Abuse |
|
|
|
| 04 Jan 2014 04:30 PM |
| output says WaitForDataReady() is a nil value |
|
|
| Report Abuse |
|
|
| |
|
|
| 04 Jan 2014 04:51 PM |
WHAT?
Don't use WaitForDataReady...
That waits until the player's data persistence stuff is accessible.
Just do:
repeat wait() until Player.Character
Keyboard not found. Press F1 to continue. |
|
|
| Report Abuse |
|
|
|
| 04 Jan 2014 05:58 PM |
| So when Player.Character exists does PlayerGui already exist? |
|
|
| Report Abuse |
|
|
|
| 04 Jan 2014 09:15 PM |
repeat wait() until Player.Character
doesn't do anything. |
|
|
| Report Abuse |
|
|
Azureous
|
  |
| Joined: 29 Jan 2012 |
| Total Posts: 25287 |
|
|
| 04 Jan 2014 09:23 PM |
Example of WaitFor Methods…
game.Players.PlayerAdded:connect(function(player) if player and player:WaitForDataReady('PlayerGui') then --code --(only works if the PlayerGui is 'DataReady') end end) |
|
|
| Report Abuse |
|
|
|
| 04 Jan 2014 09:29 PM |
--(only works if the PlayerGui is 'DataReady')
|
|
|
| Report Abuse |
|
|
| |
|
xSIXx
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 9202 |
|
|
| 04 Jan 2014 09:33 PM |
| i think you kinda need to learn the basics before you try to understand this stuff |
|
|
| Report Abuse |
|
|
Azureous
|
  |
| Joined: 29 Jan 2012 |
| Total Posts: 25287 |
|
|
| 04 Jan 2014 09:34 PM |
p:WaitForDataReady()
waits if the player is 'DataReady'
^^^ |
|
|
| Report Abuse |
|
|
|
| 04 Jan 2014 09:35 PM |
"i think you kinda need to learn the basics before you try to understand this stuff"
I do know basics, I've just never played with waiting for characters to exist |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 04 Jan 2014 10:12 PM |
game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(char) --code here end) end) |
|
|
| Report Abuse |
|
|
|
| 04 Jan 2014 10:12 PM |
--hi game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(char) --code here end) end) |
|
|
| Report Abuse |
|
|