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 » Scripters
Home Search
 

Re: Question ??

Previous Thread :: Next Thread 
Tracktion is not online. Tracktion
Joined: 06 Jun 2013
Total Posts: 1893
07 Jul 2017 12:54 PM
Why is it some scripts don't work unless you use a wait() but in studio they work perfect without it.

Almighty 全能
Report Abuse
Thedagz is not online. Thedagz
Joined: 10 Mar 2012
Total Posts: 798
07 Jul 2017 12:55 PM
1. you don't need a wait()

and the reason is because studio runs faster
Report Abuse
Thedagz is not online. Thedagz
Joined: 10 Mar 2012
Total Posts: 798
07 Jul 2017 12:56 PM
a good example would be using a character variable in a local script local Player = game.Players.LocalPlayer local Character = Player.Character -- this may work but probably not in a real good so you can do local Character = nil while Player.Character == nil or ##################arent == nil do wit() end Character = Player.Character or local Character = Player.CharacterAdded:wait()
Report Abuse
Tracktion is not online. Tracktion
Joined: 06 Jun 2013
Total Posts: 1893
07 Jul 2017 12:57 PM
What can I use instead WaitForChildren?

Almighty 全能
Report Abuse
Thedagz is not online. Thedagz
Joined: 10 Mar 2012
Total Posts: 798
07 Jul 2017 12:57 PM
you can but for things like characters you can't
Report Abuse
Tracktion is not online. Tracktion
Joined: 06 Jun 2013
Total Posts: 1893
07 Jul 2017 12:57 PM
Ah alright thank you

Almighty 全能
Report Abuse
CelluloidCats is not online. CelluloidCats
Joined: 11 Aug 2015
Total Posts: 841
07 Jul 2017 12:57 PM
WaitForChild("Part", 5)

or

repeat wait() until workspace:FindFirstChild("Part")
Report Abuse
CelluloidCats is not online. CelluloidCats
Joined: 11 Aug 2015
Total Posts: 841
07 Jul 2017 12:58 PM
the Character is a property of Player so cannot WaitForChild() because it's not a child.
Report Abuse
Thedagz is not online. Thedagz
Joined: 10 Mar 2012
Total Posts: 798
07 Jul 2017 12:58 PM
^
Report Abuse
blackmuawiyah is not online. blackmuawiyah
Joined: 10 Sep 2011
Total Posts: 263
07 Jul 2017 01:04 PM
repeat wait() until player.Character


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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