On hit react

Hey guys im trying to make it so when player 1 hits a player 2 the bot reacts to the hit for instance player 1 punches and hits player 2 and player 2 animation hurt is played

Note my Player 2 is a bot

What have you done so far?

Have you created a hit reaction animation?

Yes I have both the punch animation for player 1 and the hit reaction to player 2

How does the character react to being hit, to play the animation? Is it based on a trigger, or if statement, or bool or oncollision?

You can add punch event to animation clip. Check here more about it https://docs.unity3d.com/Manual/animeditor-AnimationEvents.html