extends Instance
Class fields
| Field | XML type | Value |
|---|---|---|
Name | string | Mouse |
summary | string | Used to receive input from the user. Actually tracks mouse events and keyboard events. |
Properties
13Hit
CoordinateFrame| Field | XML type | Value |
|---|---|---|
Name | string | Hit |
summary | string | The CoordinateFrame of where the Mouse ray is currently hitting a 3D object in the Workspace. If the mouse is not over any 3D objects in the Workspace, this property is nil. |
Icon
Content| Field | XML type | Value |
|---|---|---|
Name | string | Icon |
summary | string | The current Texture of the Mouse Icon. Stored as a string, for more information on how to format the string <a href="http://wiki.roblox.com/index.php/Content" target="_blank">go here</a> |
Origin
CoordinateFrame| Field | XML type | Value |
|---|---|---|
Name | string | Origin |
summary | string | The CoordinateFrame of where the Mouse is when the mouse is not clicking. |
Target
Object| Field | XML type | Value |
|---|---|---|
Name | string | Target |
summary | string | The Part the mouse is currently over. If the mouse is not currently over any object (on the skybox, for example) this property is nil. |
TargetFilter
Object| Field | XML type | Value |
|---|---|---|
Name | string | TargetFilter |
summary | string | A Part or Model that the Mouse will ignore when trying to find the Target, TargetSurface and Hit. |
TargetSurface
NormalId| Field | XML type | Value |
|---|---|---|
Name | string | TargetSurface |
summary | string | The NormalId (Top, Left, Down, etc.) of the face of the part the Mouse is currently over. |
UnitRay
Ray| Field | XML type | Value |
|---|---|---|
Name | string | UnitRay |
summary | string | The Unit Ray from where the mouse is (Origin) to the current Mouse.Target. |
ViewSizeX
int| Field | XML type | Value |
|---|---|---|
Name | string | ViewSizeX |
summary | string | The viewport's (game window) width in pixels. |
ViewSizeY
int| Field | XML type | Value |
|---|---|---|
Name | string | ViewSizeY |
summary | string | The viewport's (game window) height in pixels. |
X
int| Field | XML type | Value |
|---|---|---|
Name | string | X |
summary | string | The absolute pixel position of the Mouse along the x-axis of the viewport (game window). Values start at 0 on the left hand side of the screen and increase to the right. |
Y
int| Field | XML type | Value |
|---|---|---|
Name | string | Y |
summary | string | The absolute pixel position of the Mouse along the y-axis of the viewport (game window). Values start at 0 on the stop of the screen and increase to the bottom. |
hit
CoordinateFrame| Field | XML type | Value |
|---|---|---|
Name | string | hit |
target
Object| Field | XML type | Value |
|---|---|---|
Name | string | target |
Events
11Button1Down
() → void| Field | XML type | Value |
|---|---|---|
Name | string | Button1Down |
summary | string | Fired when the first button (usually the left, but could be another) on the mouse is depressed. |
Button1Up
() → void| Field | XML type | Value |
|---|---|---|
Name | string | Button1Up |
summary | string | Fired when the first button (usually the left, but could be another) on the mouse is release. |
Button2Down
() → void| Field | XML type | Value |
|---|---|---|
Name | string | Button2Down |
summary | string | This event is currently non-operational. |
Button2Up
() → void| Field | XML type | Value |
|---|---|---|
Name | string | Button2Up |
summary | string | This event is currently non-operational. |
Idle
() → void| Field | XML type | Value |
|---|---|---|
Name | string | Idle |
summary | string | Fired constantly when the mouse is not firing any other event (i.e. the mouse isn't moving, nor any buttons being pressed or depressed). |
KeyDown
(key: string) → void| Field | XML type | Value |
|---|---|---|
Name | string | KeyDown |
summary | string | Fired when a user presses a key on the keyboard. Argument is a string representation of the key. If the key has no string representation (such as space), the string passed in is the keycode for that character. Keycodes are currently in ASCII. |
KeyUp
(key: string) → void| Field | XML type | Value |
|---|---|---|
Name | string | KeyUp |
summary | string | Fired when a user releases a key on the keyboard. Argument is a string representation of the key. If the key has no string representation (such as space), the string passed in is the keycode for that character. Keycodes are currently in ASCII. |
Move
() → void| Field | XML type | Value |
|---|---|---|
Name | string | Move |
summary | string | Fired when the mouse X or Y member changes. |
WheelBackward
() → void| Field | XML type | Value |
|---|---|---|
Name | string | WheelBackward |
summary | string | This event is currently non-operational. |
WheelForward
() → void| Field | XML type | Value |
|---|---|---|
Name | string | WheelForward |
summary | string | This event is currently non-operational. |
keyDown
(key: string) → void| Field | XML type | Value |
|---|---|---|
Name | string | keyDown |