Player function returns the
Mouse being used by the client. The player’s mouse instance can be used to track user mouse input including left and right mouse button clicks and movement and location.
UserInputService service provides additional functions and events to track user input - especially for devices that do not use a mouse.
- This item must be used in a
LocalScriptto work as expected online.
- Following an update in July 2014, the mouse’s icon can now be set with this method.
An instance of the player’s mouse.
How to Track Mouse Input
The below example will print:
Button 1 is down
Players/LocalPlayer left clicks.