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 » Club Houses » Clans & Guilds
Home Search
 

what is a good way to wait until character loaded

Previous Thread :: Next Thread 
thea96 is not online. thea96
Joined: 09 Feb 2011
Total Posts: 37634
22 Aug 2014 11:17 AM
instead of adding wait(.2) which wARC did
I want something more reliable
Report Abuse
webspace is not online. webspace
Joined: 25 Nov 2008
Total Posts: 119892
22 Aug 2014 11:17 AM
why is wait not reliable
Report Abuse
Inversus is not online. Inversus
Joined: 30 Jul 2010
Total Posts: 18551
22 Aug 2014 11:18 AM
oh I thought you meant you got bored waiting for your character to load ingame
and I had a witty comment which I was going to post
which was
"look up new computers"
but now it's irrelevant
so nvm
Report Abuse
thea96 is not online. thea96
Joined: 09 Feb 2011
Total Posts: 37634
22 Aug 2014 11:20 AM
I have this

local plr=game.Players.LocalPlayer
local chr=plr.Character

it starts running when character isnt in workspace yet
so it messes up

i could add a wait(.2) or something but that .2 seconds is just a guess of how long it will take
Report Abuse
Asporto is not online. Asporto
Joined: 16 Aug 2014
Total Posts: 1654
22 Aug 2014 11:22 AM
[ Content Deleted ]
Report Abuse
thea96 is not online. thea96
Joined: 09 Feb 2011
Total Posts: 37634
22 Aug 2014 11:23 AM
yeah im trying characteradded right now
Report Abuse
bohdan77 is not online. bohdan77
Joined: 10 Aug 2008
Total Posts: 7944
22 Aug 2014 11:23 AM
local Character = workspace:WaitForChild(Player.Name)
Report Abuse
thea96 is not online. thea96
Joined: 09 Feb 2011
Total Posts: 37634
22 Aug 2014 11:24 AM
nvm i got it to work
just put a waitforchild for some gui
because usually gui loads around the same time as character
Report Abuse
Gentaurg is not online. Gentaurg
Joined: 19 Mar 2011
Total Posts: 8648
22 Aug 2014 11:24 AM
Load.Function:()_Ex-DeltafunctionBB5
___:ExCmdB1
Print ("Systems Running. Loading... [============XXO(")#(!82310938030891] :SYSTEM ERROR:(PRINT "ERROR")
If_Sys.Error="1/0" then
Sys.Error= Math.Error
If Sys.Error=Math.Error then
"Commit Self Killing"____Sys.Ex
Else Wait (0.2)
PrimalEnd
End
Report Abuse
thea96 is not online. thea96
Joined: 09 Feb 2011
Total Posts: 37634
22 Aug 2014 11:25 AM
oh
i didnt think of that bohdan..
that makes things much better
Report Abuse
Unclear is not online. Unclear
Joined: 27 Aug 2011
Total Posts: 17060
22 Aug 2014 11:25 AM
local character = player.CharacterAdded:wait()

OR

local character = workspace:WaitForChild(player.Name)

OR

local character
while character == nil do
game:GetService("RunService").RenderStepped:wait()
character = player.Character
end


I use the second one.

~~ tu tu tu tu tu tu ru ♪♪
Report Abuse
bohdan77 is not online. bohdan77
Joined: 10 Aug 2008
Total Posts: 7944
22 Aug 2014 11:27 AM
I wouldn't use the first since the character could somehow appear before the script ran.
@Unclear
Report Abuse
thea96 is not online. thea96
Joined: 09 Feb 2011
Total Posts: 37634
22 Aug 2014 11:28 AM
local plr=game.Players.LocalPlayer
local pgui=plr:WaitForChild("PlayerGui")
local debris=game:GetService("Debris")
local chr=workspace:WaitForChild(plr.Name)
torso = chr:WaitForChild("Torso")

works great
now wARC doesnt glitch as much
Report Abuse
Unclear is not online. Unclear
Joined: 27 Aug 2011
Total Posts: 17060
22 Aug 2014 11:28 AM
@bohdan


well i wouldnt use the one we use and would use the while loop instead because what if the character's name ~= the player's name o.O


~~ tu tu tu tu tu tu ru ♪♪
Report Abuse
Asporto is not online. Asporto
Joined: 16 Aug 2014
Total Posts: 1654
22 Aug 2014 11:28 AM
[ Content Deleted ]
Report Abuse
Clerical is not online. Clerical
Joined: 18 Dec 2012
Total Posts: 11724
22 Aug 2014 11:29 AM
my brain is overheating...
Report Abuse
bohdan77 is not online. bohdan77
Joined: 10 Aug 2008
Total Posts: 7944
22 Aug 2014 11:29 AM
@Unclear
why wouldn't the characters name not equal the player name when it first becomes created? O_O
Report Abuse
Cirvius is not online. Cirvius
Joined: 12 Jul 2011
Total Posts: 18817
22 Aug 2014 11:29 AM
AgentGrua has spoken...
Report Abuse
thea96 is not online. thea96
Joined: 09 Feb 2011
Total Posts: 37634
22 Aug 2014 11:29 AM
>>what if the character's name ~= the player's name o.O


wot
Report Abuse
Unclear is not online. Unclear
Joined: 27 Aug 2011
Total Posts: 17060
22 Aug 2014 11:30 AM
@bohdan

what if the character (like you posed in your hypothetical) was already loaded before the script and its name was changed o.O

~~ tu tu tu tu tu tu ru ♪♪
Report Abuse
Asporto is not online. Asporto
Joined: 16 Aug 2014
Total Posts: 1654
22 Aug 2014 11:30 AM
[ Content Deleted ]
Report Abuse
Gentaurg is not online. Gentaurg
Joined: 19 Mar 2011
Total Posts: 8648
22 Aug 2014 11:30 AM
I didn't speak I typed but I guess you are correct in this context.
Report Abuse
thea96 is not online. thea96
Joined: 09 Feb 2011
Total Posts: 37634
22 Aug 2014 11:31 AM
this is a gun script not black magic name changin stuff
Report Abuse
Asporto is not online. Asporto
Joined: 16 Aug 2014
Total Posts: 1654
22 Aug 2014 11:31 AM
[ Content Deleted ]
Report Abuse
bohdan77 is not online. bohdan77
Joined: 10 Aug 2008
Total Posts: 7944
22 Aug 2014 11:31 AM
O_o






....or maybe the developer of the game should just know how his thing works and do what he wants...
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 2Go to page: [1], 2 Next
 
 
ROBLOX Forum » Club Houses » Clans & Guilds
   
 
   
  • 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