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: while true do

Previous Thread :: Next Thread 
millionand3 is not online. millionand3
Joined: 01 Sep 2013
Total Posts: 139
03 Aug 2014 06:21 PM
can I have multiple while true do's in one script?

Or will it only read one of them


(Local script)
Report Abuse
Kodran is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
03 Aug 2014 06:23 PM
You can use coroutines to have multiple.

http://wiki.roblox.com/index.php?title=Beginners_Guide_to_Coroutines
Report Abuse
plistra is not online. plistra
Joined: 12 Mar 2014
Total Posts: 859
03 Aug 2014 06:23 PM
It will only read one until it stops looping(which it wont), then it will move on.

Just have multiple scripts or something.
Report Abuse
Stefan631 is not online. Stefan631
Joined: 23 Dec 2010
Total Posts: 1350
03 Aug 2014 06:23 PM
You can with coroutines!

coroutine.resume(coroutine.create(function()
while wait() do

end;
end));

coroutine.resume(coroutine.create(function()
while wait() do

end;
end));

Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
03 Aug 2014 06:24 PM
It depends.
If you ever break the loop it will continue the script and if there happens to be another loop, that will run.
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