Animator Doesn't Work Perfectly

I have a player with sooting animation, also, I have a button that when i click it the shooting animtor works, but i have a problem.
The shooting animtor works only once and not every time I click the button. I don’t want to make the shooting animator into a loop because when I will Instantiate the bullet out of the gun it will look so weird.
how can i do that when i click the button the sooting animator will work?
pls guys.
thanks for everyone.

@oreltubul9 in your script do the following

public Animation playerAnim;

void Update(){

And then in your Animation create an event where you want your bullet to fire and Instantiate your bullet. Hope this helps :smiley:

@Aryanjumani thanks but it didn’t work, do you know how to do it in the animator and not in the animation?