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: How do I wait for something to load

Previous Thread :: Next Thread 
chugmilk is not online. chugmilk
Joined: 28 May 2011
Total Posts: 5756
07 Nov 2015 03:12 PM
before executing next line of code?



Knife? What knife?.... ( ͡° ͜V ͡°)\🔪
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
07 Nov 2015 03:13 PM
If you're waiting for an instance, use WaitForChild.
Report Abuse
chugmilk is not online. chugmilk
Joined: 28 May 2011
Total Posts: 5756
07 Nov 2015 03:22 PM
I used WaitForChild() here, but it only runs the function sometimes






inlobby = script.Parent.Main.inlobby
ok = script.Parent.Main.Lobbytime

inlobby.Changed:connect(function() --The event I'm trying to run
if inlobby.Value == true then
while inlobby.Value==true do
for i = ok.Value-1, 0, -1 do
print(i)
wait(1)
end
i=ok
end
end
end)




script.Parent:WaitForChild("poop") -- "poop" is in a seperate script!
inlobby = script.Parent.Main.inlobby
inlobby.Value = true -- This is supposed to fire the event



Knife? What knife?.... ( ͡° ͜V ͡°)\🔪
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