Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.
InputActionType
This enum is used by InputAction.Type to determine which input data type the InputAction will receive.
Items
| Name | Value | Description |
|---|---|---|
| Bool | 0 | The InputAction will receive boolean values from button inputs, for example true/false on press/release from inputs such as KeyCode.ButtonA or KeyCode.E. This setting also exposes the UIButton property on child InputBindings, allowing you to easily hook up press or release of a GuiButton for the action. |
| Direction1D | 1 | The InputAction will receive numerical values, generally from analog gamepad triggers such as KeyCode.ButtonL2 or KeyCode.ButtonR2. This setting also exposes the Up and Down properties on child InputBindings, allowing for boolean inputs or "1D" inputs as composite directions for the action. |
| Direction2D | 2 | The InputAction will receive Vector2 values, generally from thumbstick inputs such as KeyCode.Thumbstick1 and KeyCode.Thumbstick2. This setting also exposes the Up, Down, Left, and Right properties on child InputBindings, allowing for "2D" inputs as composite directions for the action. |
| Direction3D | 3 | The InputAction will receive Vector3 values from inputs assigned to the Up, Down, Left, Right, Forward, and/or Backward properties on child InputBindings, allowing for "3D" inputs as composite directions for the action. |
| ViewportPosition | 4 | The InputAction will receive Vector2 values representing the absolute pixel (X, Y) coordinates of a pointer input in the viewport. |
Bool
The InputAction will receive boolean values from button inputs, for example true/false on press/release from inputs such as KeyCode.ButtonA or KeyCode.E. This setting also exposes the UIButton property on child InputBindings, allowing you to easily hook up press or release of a GuiButton for the action.
| Field | Value |
|---|---|
| value | 0 |
Direction1D
The InputAction will receive numerical values, generally from analog gamepad triggers such as KeyCode.ButtonL2 or KeyCode.ButtonR2. This setting also exposes the Up and Down properties on child InputBindings, allowing for boolean inputs or "1D" inputs as composite directions for the action.
| Field | Value |
|---|---|
| value | 1 |
Direction2D
The InputAction will receive Vector2 values, generally from thumbstick inputs such as KeyCode.Thumbstick1 and KeyCode.Thumbstick2. This setting also exposes the Up, Down, Left, and Right properties on child InputBindings, allowing for "2D" inputs as composite directions for the action.
| Field | Value |
|---|---|
| value | 2 |
Direction3D
The InputAction will receive Vector3 values from inputs assigned to the Up, Down, Left, Right, Forward, and/or Backward properties on child InputBindings, allowing for "3D" inputs as composite directions for the action.
| Field | Value |
|---|---|
| value | 3 |
ViewportPosition
The InputAction will receive Vector2 values representing the absolute pixel (X, Y) coordinates of a pointer input in the viewport.
| Field | Value |
|---|---|
| value | 4 |