A modern, elegant alternative to the PlayerMouse
Welcome to the PlayerMouse2 documentation! PlayerMouse2 is an elegant, modern alternative to the PlayerMouse.
Describes the change in the mouse position since the last frame. Only works if mouse is locked in place.
Describes a CFrame
of the mouse position in the 3D world. This property respects the TargetFilter
.
Describes a boolean that determines if the mouse icon is enabled or not.
Describes the surface normal the mouse is on, as a Vector3. Returns a blank identity Vector3 if there is no Target
.
Describes a CFrame that starts at the camera’s CFrame.Position
that orients towards the mouse’s Hit.Position
.
Describes the 2D coordinates
Describes the delta sensitivity of the mouse
Describes the part the mouse is currently hovering over. Nil if pointing at the sky/an ignored part.
Describes a list of instances to ignore. Ignores the Player.Character
by default.
Describes a unit ray positioned at the camera directed towards the mouse’s Hit.Position
.
Describes the maximum distance the mouse can reach. Default value is 1000.
Fires when the left mouse button is pressed.
Fires when a full left mouse button click is finished.
Fires when the left mouse button is released (fires after LeftClicked
).
Fires when the right mouse button is pressed.
Fires when a full right mouse button click is finished.
Fires when the right mouse button is released (fires after RightClicked
).
Fires when the mouse moves, and passes the mouse delta as an argument to its listeners.
Fires when the mouse wheel is scrolled, and passes the scroll direction as an argument to its listeners (1 = scroll up, -1 = scroll down).
Fires when the mouse wheel is released.
Fires when a full mouse wheel click is finished.
Fires when the mouse wheel is pressed.