I am trying to implement custom events, but I am struggling with the :Wait() method. I need to pause the thread or script that called the :Wait() method until the custom event is fired, but I would rather not use
wait() until to implement this. The custom events metatable is stored in a module script called utils.
I thought what I could do instead is pause the thread that called the function, but I do not know how I would find the thread which called this function. Consequently, I am unable to pause it. Is there any way I can go around implementing this?
An example of the behaviour I want is shown below: