Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you use the Coroutines for loops?

I did take a look at the RBX Wiki, and all the examples are Functions instead of loops.

1 answer

✓ Accepted answer

You could try:

coroutine.wrap(function()
	while wait() do
		print'lol'
	end
end)()

while wait() do
	print'yep'
end

So basically it prints out(in output):

lol yep lol....

Hope this helped!

1 comment

1

Thanks!

This discussion is preserved as it was. New answers, comments, and votes are closed.