I’m trying to implement a paralyze effect on a gameobject using this code:
I’m having a problem where it’s being called over and over seemingly every frame. I don’t understand why this would be happening if I’m using ‘WaitForSeconds’ to add a delay before calling again.
The gameobject also does not stay paralyzed for the entirety of the paralyzeLength, it only stutters and then continues to loop.
Do you see anything inherently wrong with this code?
Thanks for the help!