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

GetMouse

Returns the mouse being used by the client.

Returns

Return Type Summary

Code Samples


How to Track Mouse Input

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)