Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do you use the Coroutines for loops?

Asked by 9 years ago

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

1 answer

Log in to vote
0
Answered by
woodengop 1134 Moderation Voter
9 years ago

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
Thanks! BringUpon 25 — 9y
Ad

Answer this question