So, you have the animations. And you have choosen a key. I suppose you play the animation when the key is pressed.
I suppose you have some variable that gets set when the key is pressed, so when a 'block' happens
Do you check that variable when the thing hits the player before drawing health.
For how much time is that variable set to block ? One tick ? As long as the animation ? As long as the key pressed ?
When and how is that variable resetted ?