Grab the player damaged texture
Add a TextureRect as a child of Player
Rename it to DamageTexture
Add damage.png as the texture
To animate the damage effect
Add an AnimationPlayer as a child of TextureRect
Rename it to DamageAnimationPlayer
Select the DamageTexture node
Hit the key next to Scale and add the Reset track
Set the animation duration to 0.4 seconds
Move to 0.4 on the timeline
Set the Scale to 1.5 and Key it
Move to 0.0 on the timeline
Select the DamageTexture node
Move the timeline to 0.4 seconds
Set the Alpha channel of the Modulate property
To make sure the texture starts out invisible
Double click the Modulate Square
Set the RESET track to Autoplay
In the Hitpoints set method
is less than the remaining hitpoints
stop the damage animation then