of     1   

AntiFiter
#146546817Monday, September 22, 2014 12:18 AM GMT

I was thinking about how to make guns semi-auto or single shot. To continue shooting, you obviously hold down the left mouse button. Is there a unclick event for when you stop shooting when using a semi-auto? (I just would like to know how it works if you happen to have experience)
EchoingEndlessly
#146546974Monday, September 22, 2014 12:20 AM GMT

mouse.Button1Down:connect(function() repeat --shoot until shooting == false end) mouse.Button1Up:connect(function() shooting = false; end)
blockoo
#146547477Monday, September 22, 2014 12:27 AM GMT

I think a while loop would be better here: mouse.Button1Down:connect(function() shooting = true while shooting do --stuff end end) mouse.Button1Up:connect(function() shooting = false; end)

    of     1