Just as the question says, how to have my character play animation when taking damage? The character gets attacked and plays a react hit animation when taking damage.
What I did to fix my problem was create a custom event that fires every time the player character gets attacked, if the health hits zero the player character plays the dying animation. But if the health is still above 0 it plays the hit animation every time the player character is attacked.