How to get an enemy to play a react animation when you attack. Then the enemy goes back to attacking you

I have been trying to get this to work for hours but no luck.

Look into playing the anim as a matinee in the animation blueprint for the enemy. Needs to be done in event graph I think. Trigger it with a custom event if multiplayer it gets more difficult but not much.
Gl hf