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: Do you know?

Previous Thread :: Next Thread 
hkep is not online. hkep
Joined: 19 Jul 2014
Total Posts: 550
07 Mar 2016 10:58 PM
Do you know how to run a continuous for loop in roblox studio?
Report Abuse
AdvancedObjects is not online. AdvancedObjects
Joined: 11 Dec 2012
Total Posts: 3354
07 Mar 2016 11:00 PM
while true do
for i, v in pairs (whatever) do

end
end

???



Report Abuse
izzatnasruna is not online. izzatnasruna
Joined: 09 Jun 2009
Total Posts: 1927
07 Mar 2016 11:00 PM
Why not:

repeat wait()
until false

?
Report Abuse
hkep is not online. hkep
Joined: 19 Jul 2014
Total Posts: 550
07 Mar 2016 11:03 PM
Because it needs to be a for loop.

@AdvancedObjects
That would be a while loop.
Report Abuse
MisunderstoodOwl is not online. MisunderstoodOwl
Joined: 04 Oct 2014
Total Posts: 181
07 Mar 2016 11:37 PM
for i = 1, math.huge do

end
Report Abuse
myactivetestplace is not online. myactivetestplace
Joined: 11 Jul 2015
Total Posts: 3733
07 Mar 2016 11:41 PM
for i = 1,10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e^10 do

end
Report Abuse
hkep is not online. hkep
Joined: 19 Jul 2014
Total Posts: 550
07 Mar 2016 11:58 PM
Nope.
Report Abuse
myactivetestplace is not online. myactivetestplace
Joined: 11 Jul 2015
Total Posts: 3733
08 Mar 2016 12:00 AM
Nope what?
Report Abuse
izzatnasruna is not online. izzatnasruna
Joined: 09 Jun 2009
Total Posts: 1927
08 Mar 2016 01:42 AM
for i = 1,math.huge do
end

I don't think 'i' will ever reach math.huge. Because math.huge is math.huge
Report Abuse
Flux_Capacitor is not online. Flux_Capacitor
Joined: 07 Apr 2008
Total Posts: 45720
08 Mar 2016 01:43 AM
Technically speaking... it won't XDDDDDX
Report Abuse
hkep is not online. hkep
Joined: 19 Jul 2014
Total Posts: 550
08 Mar 2016 08:38 AM
@izzatnasruna
Technically math.huge is the largest number that can be reached in roblox lua. Correct me if I'm wrong on that.

It is possible though.
It is the equivlant of 'while true do end'.
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
08 Mar 2016 10:00 AM
Isn't a continous for loop the same thing as a loop that never stops? Just use a while [true] loop.

Enjoying your stay at the Scripters Forum? Join this! http://www.roblox.com/My/Groups.aspx?gid=2582784
Report Abuse
ownedyou1 is not online. ownedyou1
Joined: 03 Jul 2008
Total Posts: 528
08 Mar 2016 10:43 AM
deb=true
while true do
if deb==true then
stoof()
else
wait()
end
wait()
end
Report Abuse
ownedyou1 is not online. ownedyou1
Joined: 03 Jul 2008
Total Posts: 528
08 Mar 2016 10:43 AM
the 2nd wait slows it down a lot reduces server impact
Report Abuse
hkep is not online. hkep
Joined: 19 Jul 2014
Total Posts: 550
08 Mar 2016 11:37 AM
@powerhotmail123
Because it is a trivia question.
Report Abuse
WoolHat is not online. WoolHat
Joined: 19 May 2013
Total Posts: 1873
08 Mar 2016 01:33 PM
can't actually test this. Just want to play with the idea

local y = 2
for i = 1,y do
y = y + 1
wait()
end

If this doesn't work, I'd assume because the for loop doesn't check the variable y's value after each iteration.
Report Abuse
ExtremeBuilder15 is not online. ExtremeBuilder15
Joined: 01 May 2012
Total Posts: 3176
08 Mar 2016 02:15 PM
@Wool, ya, it doesn't
Report Abuse
hkep is not online. hkep
Joined: 19 Jul 2014
Total Posts: 550
08 Mar 2016 04:29 PM
This thread has had over 100 reviews and 16 replies.
None of which is correct.
So here is a hint, it is a generic for loop.
Report Abuse
Flux_Capacitor is not online. Flux_Capacitor
Joined: 07 Apr 2008
Total Posts: 45720
08 Mar 2016 04:44 PM
lmao hkep is a skid
Report Abuse
Roblok1 is not online. Roblok1
Joined: 27 Jul 2011
Total Posts: 2019
08 Mar 2016 05:00 PM
Why do you need an infinite for loop? What is it used for?
Report Abuse
Garfanzo is not online. Garfanzo
Joined: 24 Apr 2015
Total Posts: 742
08 Mar 2016 05:02 PM
function bob()
stuff
wait(1)
bob()
end
Report Abuse
hkep is not online. hkep
Joined: 19 Jul 2014
Total Posts: 550
08 Mar 2016 10:02 PM
@Roblok1, it is like a trivia question. It isn't used for anything.
The post doesn't say anything about using it.

@Garfanzo, that is tail-calling with a function

Report Abuse
Roblok1 is not online. Roblok1
Joined: 27 Jul 2011
Total Posts: 2019
08 Mar 2016 10:09 PM
@hkep
whatever then


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