I'm trying to make a (relatively) simple fully-automatic gun. I won't post the entire code, but this is where something's going wrong:
function onEquipped(mouse) print("Check 1") --This works mouse.Button1Down:connect(function() onButton1Down(mouse) end) end gun.Equipped:connect(onEquipped)
...And above that I have the onButton1Down function...
function onButton1Down(mouse) print("Check 2") --This doesn't work --...more code end
Here your error its you only didnt put your code in a local script, you can't got the mouse in a server script because the mouse is local. For more information on the mouse you can go one wiki here