UserInputState
The UserInputState
enum represents the state of user input actions currently occurring or recently completed. It is widely used by the InputObject.UserInputState
property, as well as various events in the UserInputService
and GuiObject
. The behavior of the enum may vary depending on the input type (Enum.UserInputType
).
Items
Begin
0
Triggered when an InputObject
starts interacting with the game. Examples: key pressed, mouse button pressed, or touch begins.
Change
1
Occurs during an ongoing interaction where the state is continuously changing. Examples: mouse movement, gamepad thumbstick movement, or touch drag.
End
2
Triggered when an InputObject
stops interacting with the game. Examples: releasing a key, mouse button, or ending a touch.
Cancel
3
Marks an input as no longer relevant to a bound action, particularly with ContextActionService
. Example: an input is unbound or reassigned mid-interaction.
None
4
A placeholder state. This state is not used during gameplay and simply marks the end of the enum.
Last updated