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: Can you restar a while loop?

Previous Thread :: Next Thread 
Greak5245 is not online. Greak5245
Joined: 15 Jun 2013
Total Posts: 235
07 Sep 2014 12:16 PM
If your statement turns false in a while loop. Then it turns back true, the loop will start again right?
Report Abuse
Vuva is not online. Vuva
Joined: 22 Jan 2010
Total Posts: 1102
07 Sep 2014 12:22 PM
No, it won't start again.
But you could have it in a function to start it up again

Variable=true
function StartLoop()
while Variable do
--stuff
end
end
StartLoop()
Report Abuse
nicemike40 is not online. nicemike40
Joined: 19 Dec 2008
Total Posts: 1814
07 Sep 2014 12:41 PM
Or you could just do something like this

while true do
if variable then
-- do stuff
end
end
Report Abuse
Greak5245 is not online. Greak5245
Joined: 15 Jun 2013
Total Posts: 235
07 Sep 2014 12:51 PM
@nicemike40 How will that start the while loop?
Report Abuse
blockoo is not online. blockoo
Joined: 08 Nov 2007
Total Posts: 17202
07 Sep 2014 12:53 PM
It doesn't start it, but it prevents the loop from ever stopping in the first place.
Report Abuse
Greak5245 is not online. Greak5245
Joined: 15 Jun 2013
Total Posts: 235
07 Sep 2014 01:51 PM
Well, that does not help me at all.
Report Abuse
EliteDerper is not online. EliteDerper
Joined: 05 Feb 2012
Total Posts: 2288
07 Sep 2014 01:53 PM
enabled = true

while enabled do
-- stuff
end
Report Abuse
Greak5245 is not online. Greak5245
Joined: 15 Jun 2013
Total Posts: 235
07 Sep 2014 01:57 PM
@EliteDerper That is even more useless. I know how a while loop work. @Vuva's script works so the problem is fixed. Ty Vuva ^^
Report Abuse
Greak5245 is not online. Greak5245
Joined: 15 Jun 2013
Total Posts: 235
07 Sep 2014 01:59 PM
Elite what you said was basicaly

while true do
--code
end

Just with a way to shut it down.
Report Abuse
EliteDerper is not online. EliteDerper
Joined: 05 Feb 2012
Total Posts: 2288
07 Sep 2014 02:11 PM
You can enable and disable it, its not useless you just have to know how to script.
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