I’m trying to make a life system in my game. So you die and lose a life. For some reason though, the die script im using keeps going even though the condition isn’t true.
You probably do not reset your playerHealth, once died, it appears to stay 0 and the condition is true (<= 0).
A computer only does what he’s told to do and if it runs the code, it’s the programmers fault
Not enough information, tbh. You should post what your RespawnPlayer functions and such do. Only current suggestion I can give is to maybe move your “isDead = true;” statement above your function calls to be just under your “playerHealth = 0;” because maybe your function calls are doing something and that flag coming after them is doing something wonky?