Hello guys!
The thing is that I want to play a firing animation just once when we press the left mouse button. And I have set it up so that if you keep pressing the left mouse button forever, the player will shoot just once and then stop shooting. You have to manually press the button every time you want to shoot. The problem is that the animation of shooting still plays if you keep holding the mouse button down though the firing and the damaging stops. Any suggestions on how can I make it so that whenever someone keeps holding the button the animation too just plays once and stops. I have tried setting up a timer to track the time the button is pressed and if it goes out of a certain range, set the parameter “isFiring” to false using Time.time. But either I totally flunked at coding it or visual studio just envies me. So, I would gladly accept any help.
Thanks in advance!!