PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience

How to Track Mouse Input

How to Track Mouse Input

Oct 01 2018, 1:33 AM PST

The below example will print:

Button 1 is down

whenever the Players/LocalPlayer left clicks.

local Player = Game.Players.LocalPlayer
local Mouse = Player:GetMouse()
Mouse.Button1Down:Connect(function()
     print("Button 1 is down")
end)