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

Is there a better way to check if a coroutine is dead?

Asked by 2 years ago
Edited 2 years ago

I have 2 coroutines running. When they are running I want to halt the script and only continue if both coroutines are dead.

Note: both coroutines have already been created and the script below works perfectly fine.

What I have is

repeat wait() until coroutine.status(Event1) == "dead" and coroutine.status(Event2) == "dead"

I'm new to using this coroutine thing so I wonder if there's a better alternative

1 answer

Log in to vote
0
Answered by 2 years ago

You will have to make sure you created the coroutine first

0
I did, and the script above works just fine, just wondering if there's a better way of doing it cuz i'm new to this coroutine stuff Gmorcad12345 434 — 2y
0
could you tell me what exactly you are trying to do Verbalase_notreal 23 — 2y
0
i know you are checking to see if both of the running coroutines are dead but i want to know what exacly you are trying to do Verbalase_notreal 23 — 2y
Ad

Answer this question