Player not dying when health is down to 0

My player starts with 100 health but when the player reaches 0 health i want them to die but instead it just keeps going negative.

As you can see the player is now down to -20 health and still not dead. is there anyway for me to fix this?

First of all you need to clamp the health variable so it does not go below 0.

Second, you need to have a variable in your Animgraph, for example a bool “IsAlive”. And you need to change that bool in your character BP whenever the char’s health is 0. You need to make another state in your AnimGraph so that you switch you “dead state” whenever that bool is true or false.

There are many ways to do that, but this is just an idea of mine.