Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you use Button1down for weapons?

Asked by
IcyEvil 260 Moderation Voter
10 years ago

Im going to script a weapon but I dont know how to use Button1down Any Help / Examples???

1 answer

Log in to vote
1
Answered by 10 years ago

Like this, in a LocalScript;

plr = game.Players.LocalPlayer
mouse = plr:GetMouse()

function firedonleftbuttondown()
    print'The left mouse button was pressed!'
end

mouse.Button1Down:connect(firedonleftbuttondown)
0
THANK YOU THANK YOU THANK YOU THANK YOU!!!!! IcyEvil 260 — 10y
Ad

Answer this question