AI(Enemy) Rotating after damage

After the player is hit, he tries to put a rotating animation in the process of having the character look back.

But I don’t know how to put it in. Please advise.

Each tick looks at the player with a little note.