So, I'm making a gun script, and I'm having trouble automating the gun. How can I make repeatingly shooting while holding the mouse button?
✓ ANSWER ACCEPTED
When mouse is HOLDING?
1 answer
✓ Accepted answer
The way I'd approach it, is by creating a variable holding. Then set up 2 events, Button1Down and Button1Up, then simply toggle holding correspondingly. In your fire function, have it keep shooting white holding is true.
1 comment
0
I can't get it to work :|
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Include some code so we can help you
Theres no need for any code. I'm asking how can I make a function rapidly fire when mousebutton1 is holding down