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: How do I make a script repeat forever?

Previous Thread :: Next Thread 
Equixa is not online. Equixa
Joined: 28 Aug 2012
Total Posts: 64
01 Sep 2012 04:20 PM
^^
Thanks in advance.

-Bonqed, 1 day'er
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
01 Sep 2012 04:21 PM
Loops.

http://wiki.roblox.com/index.php/Loops

(>•д•)> ¤¤ †KMXD† ¤¤ [SHG Tier~3] (^•д•^) [Freelancing Scripting Guru] <(•д•<)
Report Abuse
Equixa is not online. Equixa
Joined: 28 Aug 2012
Total Posts: 64
01 Sep 2012 04:22 PM
Oh,

Would
"while true do" work?

-Bonqed, 1 day'er
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
01 Sep 2012 04:23 PM
while true do
wait()
--code
end

or

while wait() do
--code
end

(>•д•)> ¤ ¤ † KMXD 2.0 † ¤ ¤ [SHG Tier~ nil] (^•д•^) [KMXD Stole this sig] <(•д•<)
Report Abuse
Equixa is not online. Equixa
Joined: 28 Aug 2012
Total Posts: 64
01 Sep 2012 04:25 PM
@Chop

Thanks

-Bonqed, 1 day'er
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
01 Sep 2012 04:26 PM
Or recursion :3
Report Abuse
doombringer42 is not online. doombringer42
Joined: 13 Nov 2007
Total Posts: 5445
01 Sep 2012 04:28 PM
if you're not careful, that would result in a stack overflow. 0_o

¬ SHG Scripter Tier-2, LuaLearners Elite - pm me!
Report Abuse
nickbricknick464 is not online. nickbricknick464
Joined: 22 Aug 2008
Total Posts: 8302
01 Sep 2012 04:34 PM
Be aware infinite loops with short wait times are known to cause lag.
Report Abuse
Sharpshooter26 is not online. Sharpshooter26
Joined: 26 May 2010
Total Posts: 5166
01 Sep 2012 04:37 PM
the most common ones are


while true do

--code

end

or

while wait(5) do

--code

end
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
01 Sep 2012 04:38 PM
> the most common ones are
> while true do
> --code
> end

You forgot the wait there.

(>•д•)> ¤¤ †KMXD† ¤¤ [SHG Tier~3] (^•д•^) [Freelancing Scripting Guru] <(•д•<)
Report Abuse
doombringer42 is not online. doombringer42
Joined: 13 Nov 2007
Total Posts: 5445
01 Sep 2012 04:38 PM
i wouldn't say that 'while wait(5) do' is a common type of loop. depends purely on the script.

¬ SHG Scripter Tier-2, LuaLearners Elite - pm me!
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
01 Sep 2012 04:38 PM
Please do not use

while true do

--code

end

(>•д•)> ¤ ¤ † KMXD 2.0 † ¤ ¤ [SHG Tier~ nil] (^•д•^) [KMXD Stole this sig] <(•д•<)
Report Abuse
doombringer42 is not online. doombringer42
Joined: 13 Nov 2007
Total Posts: 5445
01 Sep 2012 04:39 PM
knightmarexd, he didn't necessarily forget. wait() can be part of the coding.

¬ SHG Scripter Tier-2, LuaLearners Elite - pm me!
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
01 Sep 2012 04:39 PM
Late post..

(>•д•)> ¤ ¤ † KMXD 2.0 † ¤ ¤ [SHG Tier~ nil] (^•д•^) [KMXD Stole this sig] <(•д•<)
Report Abuse
Sharpshooter26 is not online. Sharpshooter26
Joined: 26 May 2010
Total Posts: 5166
01 Sep 2012 04:40 PM
Use while wait() do

I hear its better the

while true do

wait()
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
01 Sep 2012 04:40 PM
Sure, but he most likely did.

(>•д•)> ¤¤ †KMXD† ¤¤ [SHG Tier~3] (^•д•^) [Freelancing Scripting Guru] <(•д•<)
Report Abuse
Sharpshooter26 is not online. Sharpshooter26
Joined: 26 May 2010
Total Posts: 5166
01 Sep 2012 04:42 PM
Knight


He asked for an infinite loop

not a non laggy infinite loop


c:
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