animation stops when following the player and out of screen

i use this code for a gameobject to follow the player when hit:



the gameobject is animated, but the animation stops forever as soon as it follows the player and is out of screen. it is still playing the animation if it is following the player and still on screen. i do not have coded that the animation should stop, when it is out of screen.
does anybody know why?

thank you!

Make sure the Culling Type option in your Animation component is set to “Always Animate”. Also make sure your animation clip’s wrap mode is not “Clamp Forever”.