API:Class/PlayerMouse

Filtered-inheritance mode: While this class technically inherits all Instance class members, some (if not all) have been hidden because they serve no purpose for this object.

Mouse.pngPlayerMouse : Mouse.pngMouse : Object Icon.pngInstance

Each Player has a PlayerMouse which acts exactly the same as the Mouse object. The only way to access this object is with the GetMouse method of the Player object from a LocalScript.

Properties

PropertiesmemberhiddenProperties [toggle]

Inherited from Mouse.pngMouse:
CFrameHit [readonly]

The position of where the mouse is pointing.

|RMD member="API:Class/Mouse/Hit"|The position of where the mouse is pointing.|/RMD|
ContentIcon

Sets the mouse's icon.

|RMD member="API:Class/Mouse/Icon"|Sets the mouse's icon.|/RMD|
CFrameOrigin [readonly]

CFrame positioned at the Player's camera and oriented toward where the mouse is pointed in the game world.

|RMD member="API:Class/Mouse/Origin"|CFrame positioned at the Player's camera and oriented toward where the mouse is pointed in the game world.|/RMD|
Ref<BasePart>Target [readonly]

The object that the mouse is pointing to.

|RMD member="API:Class/Mouse/Target"|The object that the mouse is pointing to.|/RMD|
Ref<Instance>TargetFilter

If set, the TargetFilter and its descendants will be ignored when determining which part the mouse is pointing to. It is expected, but not required to be a Object Icon.pngPVInstance.

|RMD member="API:Class/Mouse/TargetFilter"|If set, the TargetFilter and its descendants will be ignored when determining which part the mouse is pointing to.

It is expected, but not required to be a Object Icon.pngPVInstance.|/RMD|

NormalIdTargetSurface [readonly]

The side of the instance that the mouse is pointing to.

|RMD member="API:Class/Mouse/TargetSurface"|The side of the instance that the mouse is pointing to.|/RMD|
RayUnitRay [readonly]

A ray starting from the player's Camera and traveling in the direction where the player's Mouse is projecting in the world.

|RMD member="API:Class/Mouse/UnitRay"|A ray starting from the player's Camera and traveling in the direction where the player's Mouse is projecting in the world.|/RMD|
intViewSizeX [readonly]

Represents the width of the game window in pixels.

|RMD member="API:Class/Mouse/ViewSizeX"|Represents the width of the game window in pixels.|/RMD|
intViewSizeY [readonly]

Represents the height of the game window in pixels.

|RMD member="API:Class/Mouse/ViewSizeY"|Represents the height of the game window in pixels.|/RMD|
intX [readonly]

The X component of the position of the Mouse. This is the position of the Mouse on the screen.

|RMD member="API:Class/Mouse/X"|The X component of the position of the Mouse. This is the position of the Mouse on the screen.|/RMD|
intY [readonly]

The Y component of the position of the Mouse. This is the position of the Mouse on the screen.

|RMD member="API:Class/Mouse/Y"|The Y component of the position of the Mouse. This is the position of the Mouse on the screen.|/RMD|
CFramehit [deprecated] [hidden] [readonly]

Deprecated in favor of Hit.

|RMD member="API:Class/Mouse/hit"|Deprecated in favor of Hit.|/RMD|
Reftarget [deprecated] [readonly]

Deprecated in favor of Target.

|RMD member="API:Class/Mouse/target"|Deprecated in favor of Target.|/RMD|
Hit [readonly]
The position of where the mouse is pointing.
Sets the mouse's icon.
Origin [readonly]
CFrame positioned at the Player's camera and oriented toward where the mouse is pointed in the game world.
Target [readonly]
The object that the mouse is pointing to.
If set, the TargetFilter and its descendants will be ignored when determining which part the mouse is pointing to. It is expected, but not required to be a Object Icon.pngPVInstance.
TargetSurface [readonly]
The side of the instance that the mouse is pointing to.
UnitRay [readonly]
A ray starting from the player's Camera and traveling in the direction where the player's Mouse is projecting in the world.
ViewSizeX [readonly]
Represents the width of the game window in pixels.
ViewSizeY [readonly]
Represents the height of the game window in pixels.
X [readonly]
The X component of the position of the Mouse. This is the position of the Mouse on the screen.
Y [readonly]
The Y component of the position of the Mouse. This is the position of the Mouse on the screen.
hit [deprecated] [hidden] [readonly]
Deprecated in favor of Hit.
target [deprecated] [readonly]
Deprecated in favor of Target.


Events

EventsmemberhiddenEvents [toggle]

Inherited from Mouse.pngMouse:
Button1Down ( )

Fired when the mouse is in the left mouse down state.

|RMD member="API:Class/Mouse/Button1Down"|Fired when the mouse is in the left mouse down state.|/RMD|
Button1Up ( )

Fired when the left mouse button is released.

|RMD member="API:Class/Mouse/Button1Up"|Fired when the left mouse button is released.|/RMD|
Button2Down ( )

Fired when the right mouse button is pressed.

|RMD member="API:Class/Mouse/Button2Down"|Fired when the right mouse button is pressed.|/RMD|
Button2Up ( )

Fired when the right mouse button is released.

|RMD member="API:Class/Mouse/Button2Up"|Fired when the right mouse button is released.|/RMD|
Idle ( )

Fires during every heartbeat that the mouse isn't being passed to another mouse event.

|RMD member="API:Class/Mouse/Idle"|Fires during every heartbeat that the mouse isn't being passed to another mouse event.|/RMD|
Move ( )

Fired when the mouse is moved.

|RMD member="API:Class/Mouse/Move"|Fired when the mouse is moved.|/RMD|
WheelBackward ( )

Fired when the mouse wheel is moved backward.

|RMD member="API:Class/Mouse/WheelBackward"|Fired when the mouse wheel is moved backward.|/RMD|
WheelForward ( )

Fired when the mouse wheel is moved forward.

|RMD member="API:Class/Mouse/WheelForward"|Fired when the mouse wheel is moved forward.|/RMD|
KeyDown ( string key ) [deprecated]

Deprecated. Do not use.

|RMD member="API:Class/Mouse/KeyDown"|Deprecated. Do not use.|/RMD|
KeyUp ( string key ) [deprecated]

Deprecated. Do not use.

|RMD member="API:Class/Mouse/KeyUp"|Deprecated. Do not use.|/RMD|
keyDown ( string key ) [deprecated]

Deprecated in favor of KeyDown.

|RMD member="API:Class/Mouse/keyDown"|Deprecated in favor of KeyDown.|/RMD|
Fired when the mouse is in the left mouse down state.
Fired when the left mouse button is released.
Fired when the right mouse button is pressed.
Fired when the right mouse button is released.
Idle ( )
Fires during every heartbeat that the mouse isn't being passed to another mouse event.
Move ( )
Fired when the mouse is moved.
Fired when the mouse wheel is moved backward.
Fired when the mouse wheel is moved forward.
KeyDown ( string key ) [deprecated]
Deprecated. Do not use.
KeyUp ( string key ) [deprecated]
Deprecated. Do not use.
keyDown ( string key ) [deprecated]
Deprecated in favor of KeyDown.
Inherited from Object Icon.pngInstance:
Changed ( string property )

Fires after a property of the object changes.

|RMD member="API:Class/Instance/Changed"|Fires after a property of the object changes.|/RMD|
Changed ( string property )
Fires after a property of the object changes.

|RMD member="API:Class/PlayerMouse"|Each Player has a PlayerMouse which acts exactly the same as the Mouse object. The only way to access this object is with the GetMouse method of the Player object from a LocalScript. |/RMD|