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 
cheated is not online. cheated
Joined: 09 Nov 2010
Total Posts: 7073
23 Apr 2013 09:09 PM
[ Content Deleted ]
Report Abuse
ball360 is not online. ball360
Joined: 31 Mar 2009
Total Posts: 1557
23 Apr 2013 09:16 PM
Not really, simplest loop to use. Besides, not many options for inf. loops that aren't whole lot complicated.

You could use repeat...until false, if you wanted to type it faster.
Report Abuse
coolikevin22 is not online. coolikevin22
Joined: 21 Feb 2011
Total Posts: 450
23 Apr 2013 09:17 PM
Waiting 0 is like waiting nothing.. Therefore Studio will crash.

~ Make the simple, amazing ~
Report Abuse
ball360 is not online. ball360
Joined: 31 Mar 2009
Total Posts: 1557
23 Apr 2013 09:19 PM
Au contrare, my sir, wait() gives time to the engine to get everything together before executing the loop, or else ROBLOX uses every processing cycle using that loop.
Report Abuse
VisualBeta is not online. VisualBeta
Joined: 09 Dec 2012
Total Posts: 21
23 Apr 2013 09:20 PM
You mean wait()? But yeah it is efficient, so are for loops :D
Report Abuse
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
23 Apr 2013 09:20 PM
This loop has no wait() but does not crash studio

local a = 0

while a <= 7 do
a = a + 1
print(a)
end

print(":D")

-[::ƧѡÎḾḠΰῩ::]-[::Helper of Scripting and Writer of Wikis::]-
Report Abuse
ball360 is not online. ball360
Joined: 31 Mar 2009
Total Posts: 1557
23 Apr 2013 09:22 PM
It's not an infinite loop. That loop is bound to end sometime, while "true" does not change to false.
Report Abuse
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
23 Apr 2013 09:22 PM
He didn't specify that it was an infinite loop.

-[::ƧѡÎḾḠΰῩ::]-[::Helper of Scripting and Writer of Wikis::]-
Report Abuse
KillerKyle is not online. KillerKyle
Joined: 29 Jul 2007
Total Posts: 6371
23 Apr 2013 09:41 PM
wait() = wait(.01)

This is a defualt setting to prevent the crash.
Report Abuse
UnBuild is not online. UnBuild
Joined: 22 Mar 2013
Total Posts: 3233
23 Apr 2013 09:44 PM
@Killer
No, wait() = wait(0.03)
Report Abuse
ImagineIf is not online. ImagineIf
Joined: 18 Apr 2013
Total Posts: 6
23 Apr 2013 09:44 PM
while true do
wait()
end
-- I'm so smart.

~Remember remember the fifth of November
Gunpowder, treason and plot.
I see no reason why gunpowder, treason
Should ever be forgot...
Report Abuse
KillerKyle is not online. KillerKyle
Joined: 29 Jul 2007
Total Posts: 6371
23 Apr 2013 09:56 PM
[ Content Deleted ]
Report Abuse
KillerKyle is not online. KillerKyle
Joined: 29 Jul 2007
Total Posts: 6371
23 Apr 2013 09:57 PM
What? Why? All I said was "My point is, wait() isn't actually nothing".

How is that a rule breaker?
Report Abuse
UnBuild is not online. UnBuild
Joined: 22 Mar 2013
Total Posts: 3233
23 Apr 2013 09:58 PM
@Kyle
umg bad boi
Report Abuse
KillerKyle is not online. KillerKyle
Joined: 29 Jul 2007
Total Posts: 6371
23 Apr 2013 09:59 PM
These filters are freaking over the top just a little. I said absolutely nothing bad.
Report Abuse
randomsmileyface is not online. randomsmileyface
Joined: 01 Aug 2010
Total Posts: 4538
23 Apr 2013 10:03 PM
speaking on this subject, does anyone know how to break one of these loops at a certain command?
like something triggers a break
Report Abuse
UnBuild is not online. UnBuild
Joined: 22 Mar 2013
Total Posts: 3233
23 Apr 2013 10:04 PM
while script.BoolValue.Value == true do
wait(0.03)
print("True bro, true.")
end
print("y u mak et false?")
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