The beginning and end of the LMB shot

How do I…

I’m making a shooting mechanic, but how can I make it so that when I press the left mouse button the first time, the object starts shooting, but then, when I press the left mouse button a second time, the object stops shooting?

In fact, the shooting should be automatic and turn off automatically with a single button.

I tried several options, but none of them worked.

Boolean variable

1 Like