I’m currently trying to make a tutorial cutscene, however, I have no idea how long it’ll last as it depends all on what I’m doing the cutscene for.
I’d need to find a way to know when FireAllClients finishes, a callback, or something. I looked into using RemoteFunctions instead of RemoteEvents, but unfortunately, there is no InvokeAllClients. The reason why I need to use FireAllClients() is because then everyone experiences the cutscene at once.
If I were to make a for loop on all the players and then run the InvokeClient() on each player, the cutscene would happen separately. So I’m at a big roadblock.
I just need to find a way to know when the function that happens when FireAllClients() is called, or a way to make all InvokeClient()'s happening at once.
I considered a coroutine, but having 12 of those seems like it wouldn’t be the best idea.
spawn will not be executed right away while coroutine will. coroutines can be useful if you don’t want a certain task to be executed right away. There isn’t a huge difference between the two. You can read more info in this post made by another member.
As far as I know, you should avoid having too many coroutines since they are basically creating new threads in a script and having many threads won’t be very efficient.