Spawn(function() while wait(3) do print("3seconds") --Prints "3seconds" every 3 seconds and "0.1second" every 0.1 second end end) while wait(0.1) do print("0.1second") end
Help?
As I said earlier, adding another spawn should fix this. I did forget to mention that you had to use the spawn before your final while loop.
Spawn(function() while wait(5) do print("5seconds") --Prints "5seconds" every 5 seconds and "0.1second" every 0.1 second end end) Spawn(function() while wait(3) do print("3seconds") --Prints "3seconds" every 3 seconds and "0.1second" every 0.1 second end end) Spawn(function() -- keep the program looking consistent, and in case you need/want to do something AFTER this part of the script while wait(1) do -- I changed this to 1 btw. print("1second") end end)
coroutine.resume(coroutine.create(function() while wait() do --first loop end end)) coroutine.resume(coroutine.create(function() while wait() do --second loop end end)) coroutine.resume(coroutine.create(function() while wait() do --third loop end end))