Properties
bool
[ReadOnly]
[NotReplicated]
|
Describes whether the user’s device has an accelerometer |
Vector2
[Hidden]
[ReadOnly]
[NotReplicated]
|
bool
[ReadOnly]
[NotReplicated]
|
Describes whether the device being used by a user has an available gamepad |
bool
[Hidden]
[NotReplicated]
|
bool
[ReadOnly]
[NotReplicated]
|
Describes whether the user’s device has a gyroscope |
bool
[ReadOnly]
[NotReplicated]
|
Describes whether the user’s device has a keyboard available |
bool
[Hidden]
|
bool
[Deprecated]
|
Toggles whether Roblox’s mobile controls are hidden on mobile devices |
MouseBehavior
|
Determines whether the user’s mouse can be moved freely or is locked |
float
[NotReplicated]
|
Scales the delta (change) output of the user’s |
bool
[ReadOnly]
[NotReplicated]
|
Describes whether the user’s device has a mouse available |
bool
|
Determines whether the |
Vector2
[Hidden]
[ReadOnly]
[NotReplicated]
|
double
[Hidden]
[ReadOnly]
[NotReplicated]
|
Vector2
[ReadOnly]
[NotReplicated]
|
Determines the position of the on-screen keyboard |
Vector2
[ReadOnly]
[NotReplicated]
|
Determines the size of the on-screen keyboard |
bool
[ReadOnly]
[NotReplicated]
|
Describes whether an on-screen keyboard is currently visible on the user’s screen |
OverrideMouseIconBehavior
[Hidden]
|
Vector2
[Hidden]
[ReadOnly]
[NotReplicated]
|
Vector2
[Hidden]
[ReadOnly]
[NotReplicated]
|
bool
[ReadOnly]
[NotReplicated]
|
Describes whether the user’s current device has a touch-screen available |
CFrame
[ReadOnly]
[NotReplicated]
[Deprecated]
|
Describes the orientation and position of a user’s head, if they are actively using a virtual reality headset |
bool
[ReadOnly]
[NotReplicated]
|
Indicates whether the user is using a virtual reality headset |
bool
|
Determines if an |
string
[ReadOnly]
[NotReplicated]
|
A read-only string representing the class this |
int
[Hidden]
[ReadOnly]
[NotReplicated]
[Deprecated]
|
The cost of saving the instance using data persistence. |
string
|
A non-unique identifier of the |
Instance
[NotReplicated]
|
Determines the hierarchical parent of the |
bool
[Hidden]
|
A deprecated property that used to protect |
int64
[Hidden]
[NotReplicated]
|
bool
[Hidden]
[NotReplicated]
[Deprecated]
|
string
[ReadOnly]
[NotReplicated]
[Deprecated]
|
Functions
bool
|
Returns whether the given |
Array
|
Returns an array of |
InputObject
|
Returns an |
InputObject
|
Returns an |
Tuple
|
Returns an |
DeviceType
|
TextBox
|
Returns the currently |
bool
|
Returns whether a gamepad with the given |
Array
|
Returns an array of |
Array
|
Returns an array of |
UserInputType
|
Returns the |
Array
|
Returns an array of |
Vector2
|
Returns the change, in pixels, of the position of the player’s |
Vector2
|
Returns the current screen location of the player’s |
Array
|
Returns an array of |
Platform
|
string
|
Returns a string representing a key the user should press in order to input a given KeyCode |
Array
|
Returns an array of |
CFrame
|
Returns a |
bool
|
Determines whether a particular button is pressed on a particular gamepad |
bool
|
Returns whether the given |
bool
|
Returns whether the given |
bool
|
Returns true if the specified |
void
|
Recenters the |
void
|
void
|
Sets whether or not the specified |
void
|
This function destroys all of an |
Instance
|
Create a copy of an object and all its descendants, ignoring objects that are not |
void
|
Sets the |
Instance
|
Returns the first ancestor of the |
Instance
|
Returns the first ancestor of the |
Instance
|
Returns the first ancestor of the |
Instance
|
Returns the first child of the |
Instance
|
Returns the first child of the |
Instance
|
Returns the first child of the |
Instance
|
Returns the first descendant found with the given |
Actor
|
Returns the Actor associated with the Instance, usually the first Actor ancestor |
Variant
|
Returns the attribute which has been assigned to the given name |
RBXScriptSignal
|
Returns an event that fires when the given attribute changes |
Dictionary
|
Returns a dictionary of string → variant pairs for each of the |
Objects
|
Returns an array containing all of the |
string
[NotBrowsable]
|
Returns a coded string of the |
Array
[CustomLuaState]
|
Returns an array containing all of the descendants of the instance |
string
|
Returns a string describing the |
RBXScriptSignal
|
Get an event that fires when a given property of an object changes. |
bool
[CustomLuaState]
|
Returns true if an |
bool
|
Returns true if an |
bool
|
Returns true if an |
void
[Deprecated]
|
Sets the object’s Parent to nil, and does the same for all its descendants. |
void
|
Sets the attribute with the given name to the given value |
Instance
[CustomLuaState]
[CanYield]
|
Returns the child of the |
Objects
[Deprecated]
|
Returns an array of the object’s children. |
Instance
[Deprecated]
|
void
[Deprecated]
|
Instance
[Deprecated]
|
Objects
[Deprecated]
|
bool
[Deprecated]
[CustomLuaState]
|
bool
[Deprecated]
|
void
[Deprecated]
|
Events
RBXScriptSignal
|
Fired when a user moves a device that has an accelerometer. Used to track real-world device movement within a Roblox game |
RBXScriptSignal
|
Fired when the force of gravity changes on a device that has an enabled accelerometer - such as a mobile device |
RBXScriptSignal
|
Fired when a user rotates a device that has a gyroscope |
RBXScriptSignal
|
Fires when a gamepad is connected to the client. Passes the ‘‘gamepadNum’’ of the gamepad that was connected |
RBXScriptSignal
|
Fires when a gamepad is disconnected from the client. Passes the |
RBXScriptSignal
|
Fired when a user begins interacting via a Human-Computer Interface device - such as a mouse or gamepad |
RBXScriptSignal
|
Fired when a user changes how they’re interacting via a Human-Computer Interface device |
RBXScriptSignal
|
Fires when a user stops interacting via a Human-Computer Interface device
|
RBXScriptSignal
|
Fires whenever the client makes a request for their character to jump |
RBXScriptSignal
|
Fires when the client’s |
RBXScriptSignal
|
Fires when the user performs a specific pointer action (wheel, pinch, pan). |
RBXScriptSignal
|
RBXScriptSignal
|
Fired when the client loses focus on a |
RBXScriptSignal
|
Fired when the client focuses on a |
RBXScriptSignal
|
Fired when a user releases their finger from the screen on a TouchEnabled device - such as the screen of a mobile device |
RBXScriptSignal
|
Fired when a user holds at least one finger for a short amount of time on the same screen position on a TouchEnabled device - such as the screen of a mobile device |
RBXScriptSignal
|
Fired when a user moves their finger on a TouchEnabled device - such as the screen of an Apple iPad or iPhone or a Google Android phone |
RBXScriptSignal
|
Fired when a user drags at least one finger on a |
RBXScriptSignal
|
Fired when a user pinches their fingers on a |
RBXScriptSignal
|
Fires when a user rotates two fingers on a |
RBXScriptSignal
|
Fired when a user places their finger on a TouchEnabled device - such as the screen of an Apple iPad or iPhone or a Google Android phone |
RBXScriptSignal
|
Fired when a user swipes their fingers on a |
RBXScriptSignal
|
Fired when a user taps their finger on a |
RBXScriptSignal
|
Fires when a user taps the game world on a |
RBXScriptSignal
|
Fires when the |
RBXScriptSignal
|
Fires when the window of the Roblox client loses focus on the user’s screen |
RBXScriptSignal
|
Fires when the window of the Roblox client gains focus on the user’s screen |
RBXScriptSignal
|
Fires when the |
RBXScriptSignal
|
Fires whenever an attribute is changed on the |
RBXScriptSignal
|
Fired immediately after a property of an object changes. |
RBXScriptSignal
|
Fires after an object is parented to this |
RBXScriptSignal
|
Fires after a child is removed from this |
RBXScriptSignal
|
Fires after a descendant is added to the |
RBXScriptSignal
|
Fires immediately before a descendant of the |
RBXScriptSignal
|
Fires immediately before the instance is destroyed via |
RBXScriptSignal
[Deprecated]
|
Code Samples
UserInputService
The following example demonstrates one of many usage examples of handling a UserInputService event.