Skip to content
Roblox API Reference

InputAction

Defines a gameplay action mechanic. These actions are then mapped to hardware inputs using InputBinding.
Memory category
Instances
Own members
18
Inherited members
75
Subclasses
0
Siblings
608

Properties33

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Defined byInputAction10

Property categoryBehavior

Property categoryData

  • InputAction.BoolState: boolean = false
    Non-scriptable read-only property useful for debugging Bool input actions.
    • Not scriptable
    • Read only
    • Roblox script security
    • Read capabilities: Input
  • InputAction.Direction1DState: number = 0
    Non-scriptable read-only property useful for debugging Direction1D input actions.
    • Not scriptable
    • Read only
    • Roblox script security
    • Read capabilities: Input
  • InputAction.Direction2DState: Vector2 = Vector2.zero
    Non-scriptable read-only property useful for debugging Direction2D input actions.
    • Not scriptable
    • Read only
    • Roblox script security
    • Read capabilities: Input
  • InputAction.Direction3DState: Vector3 = Vector3.zero
    Non-scriptable read-only property useful for debugging Direction3D input actions.
    • Not scriptable
    • Read only
    • Roblox script security
    • Read capabilities: Input
  • InputAction.PreferredBinding: InputBinding
    The InputBinding best matching the player's current input device.
    • Read only
    • Capabilities: Input
    • Save only
  • InputAction.ViewportPositionState: Vector2 = Vector2.zero
    Non-scriptable read-only property useful for debugging ViewportPosition input actions.
    • Not scriptable
    • Read only
    • Roblox script security
    • Read capabilities: Input

Property categoryDisplay

  • InputAction.DisplayName: string = ""
    Localized display name for this action.
    • Capabilities: Input
    • Simulation access

Property categoryState Editing

  • InputAction.Editor: boolean = false
    • Not replicated
    • Not scriptable
    • Roblox script security
    • Read capabilities: Input

Methods46

Inherited fromObject3
  • Get an event that fires when a given property of the object changes.
    Parameters
    ParameterDescription
    property: string
    The property to connect to.
    Returns
    TypeDescription
    RBXScriptSignal
    A signal that fires whenever the property changes.
  • Object:IsA(className: string): boolean
    Returns true if an object's class matches or inherits from a given class.
    • Custom Lua state
    • Thread safe
    Parameters
    ParameterDescription
    className: string
    The class against which the Object's class will be checked. Case-sensitive.
    Returns
    TypeDescription
    boolean
    Describes whether the Object's class matched or is a subclass of the given class.
  • Object:isA(className: string): boolean
    Deprecated: This deprecated function is a variant of Object:IsA() which should be used instead.
    • Deprecated
    • Custom Lua state
    Parameters
    Parameter
    className: string
    Returns
    Type
    boolean

    Use IsA instead.

Inherited fromInstance39
Defined byInputAction4
  • InputAction:GetInputBindings(): { Instance }
    • Roblox script security
    • Capabilities: Input
    Returns
    Type
    { Instance }
  • InputAction:GetPreferredBindingList(count: number? = 0): { Instance }
    • Roblox script security
    • Capabilities: Input
    Parameters
    Parameter
    count: number? = 0
    Returns
    Type
    { Instance }
  • InputAction:GetState(): any
    Returns the current state of the InputAction.
    • Thread safe
    • Capabilities: Input
    • Simulation access
    Returns
    TypeDescription
    any
    The current state of InputAction.
  • InputAction:Fire(state: any)
    Deprecated: Use InputBinding:Fire() with a Scriptable binding instead.
    Updates the InputAction to the given state and fires the appropriate signals.
    • Deprecated
    • Capabilities: Input
    • Simulation access
    Parameters
    Parameter
    state: any

    Use Fire instead.

Events14

Inherited fromObject1
Inherited fromInstance9
Defined byInputAction4
  • InputAction.InputBindingsChanged: RBXScriptSignal<()>
    • Roblox script security
    • Capabilities: Input
  • InputAction.Pressed: RBXScriptSignal<()>
    Fires only when the InputAction.Type is set to Bool on a state transition from false to true.
    • Capabilities: Input
  • InputAction.Released: RBXScriptSignal<()>
    Fires only when the InputAction.Type is set to Bool on a state transition from true to false.
    • Capabilities: Input
  • InputAction.StateChanged: RBXScriptSignal<(value: any)>
    Fires for all InputActionType types whenever the state changes, except if the state attempts to transition to the same state.
    • Capabilities: Input
    Parameters
    Parameter
    value: any