i did a loopuing function and i want yo know a way to stop it.
Hello,
Hope you are not a beginner at scripting in RbxLua.
Strictly for advanced users of RbxLua.
local thread = coroutine.create(function() -- Creates a coroutine function for i,v in pairs (workspace:GetChildren()) do -- Table print(v.Name) -- Prints table print("Loop suspended on : "..i) -- prints on what loop number it was suspended. coroutine.yield() -- Suspends loop. end end) --ends coroutine function -- A loop of coroutine.resume functions. while coroutine.resume(thread) do --On coroutine.yield, this will allow in between actions. print("Waiting 1 second...") -- Print wait(1) -- Waiting 1 second. coroutine.resume(thread) --Coroutine resumes. end --Ending of loop.
I am still learning RbxLua.
Thank you for reading.