generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Whats what one thing that waits for the character to load?

Previous Thread :: Next Thread 
TheInnovative is not online. TheInnovative
Joined: 31 Dec 2008
Total Posts: 23486
04 Jan 2014 03:05 PM
What is it?
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
04 Jan 2014 03:05 PM
WaitForChild
Report Abuse
UmmmNoah is not online. UmmmNoah
Joined: 01 Jan 2014
Total Posts: 4
04 Jan 2014 03:06 PM
:WaitForChild()

I think
Report Abuse
Kingmouli is not online. Kingmouli
Joined: 28 Sep 2012
Total Posts: 1292
04 Jan 2014 03:07 PM
:WaitForCharacter ?
Report Abuse
TheInnovative is not online. TheInnovative
Joined: 31 Dec 2008
Total Posts: 23486
04 Jan 2014 04:03 PM
And how exactly do I use it?
Report Abuse
ZirutoHellfire is not online. ZirutoHellfire
Joined: 16 Aug 2012
Total Posts: 4647
04 Jan 2014 04:05 PM
:WaitForDataReady()

repeat wait() until BLA.DataReady == true

:WaitForChild()

Report Abuse
TheInnovative is not online. TheInnovative
Joined: 31 Dec 2008
Total Posts: 23486
04 Jan 2014 04:06 PM
what...

Can you give me a common example?
Report Abuse
ZirutoHellfire is not online. ZirutoHellfire
Joined: 16 Aug 2012
Total Posts: 4647
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
TheInnovative is not online. TheInnovative
Joined: 31 Dec 2008
Total Posts: 23486
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
TheInnovative is not online. TheInnovative
Joined: 31 Dec 2008
Total Posts: 23486
04 Jan 2014 04:20 PM
so all I need is DataReady?
Report Abuse
TheInnovative is not online. TheInnovative
Joined: 31 Dec 2008
Total Posts: 23486
04 Jan 2014 04:30 PM
output says WaitForDataReady() is a nil value
Report Abuse
TheInnovative is not online. TheInnovative
Joined: 31 Dec 2008
Total Posts: 23486
04 Jan 2014 04:40 PM
halp
Report Abuse
Basswobble is not online. Basswobble
Joined: 18 Jul 2011
Total Posts: 3249
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
TheInnovative is not online. TheInnovative
Joined: 31 Dec 2008
Total Posts: 23486
04 Jan 2014 05:58 PM
So when Player.Character exists does PlayerGui already exist?
Report Abuse
TheInnovative is not online. TheInnovative
Joined: 31 Dec 2008
Total Posts: 23486
04 Jan 2014 09:15 PM
repeat wait() until Player.Character

doesn't do anything.
Report Abuse
Azureous is not online. 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
TheInnovative is not online. TheInnovative
Joined: 31 Dec 2008
Total Posts: 23486
04 Jan 2014 09:29 PM
--(only works if the PlayerGui is 'DataReady')
Report Abuse
TheInnovative is not online. TheInnovative
Joined: 31 Dec 2008
Total Posts: 23486
04 Jan 2014 09:30 PM
What do you mean by that
Report Abuse
xSIXx is not online. 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 is not online. Azureous
Joined: 29 Jan 2012
Total Posts: 25287
04 Jan 2014 09:34 PM
p:WaitForDataReady()

waits if the player is 'DataReady'

^^^
Report Abuse
TheInnovative is not online. TheInnovative
Joined: 31 Dec 2008
Total Posts: 23486
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
TheInnovative is not online. TheInnovative
Joined: 31 Dec 2008
Total Posts: 23486
04 Jan 2014 09:49 PM
bump
Report Abuse
TheInnovative is not online. TheInnovative
Joined: 31 Dec 2008
Total Posts: 23486
04 Jan 2014 10:11 PM
b2
Report Abuse
FreeScriptMaker is not online. FreeScriptMaker
Joined: 29 Nov 2013
Total Posts: 2275
04 Jan 2014 10:12 PM
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
--code here
end)
end)
Report Abuse
FreeScriptMaker is not online. FreeScriptMaker
Joined: 29 Nov 2013
Total Posts: 2275
04 Jan 2014 10:12 PM
--hi
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
--code here
end)
end)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image