What are Coroutine's for?

Hello! So I earned what Coroutine’s are, the issue is I don’t know what to use it for

So What do scripters use this for?

also what is Corountine.wrap for?

It’s basically creating another thread, but it’s a pseudo-thread, meaning it can perform two tasks pseudo-simultaneously. That’s what the library is for.

2 Likes

Coroutines are a way of creating and managing threads, you probably see them a lot because it allows scripters to run loops in a script whilst handling other functions in the same script, coroutines are one of a few types of threading they provide the most control though allowing people to yield (stop) them and resume them anywhere in the script.

In short coroutines allow scripters to create scripts within scripts without having to actually use a script if that makes any sense

1 Like