Open Asterune
UserInputState

UserInputState

Identifies the lifecycle state of an input.

Access items through Enum.UserInputState.

Behavior

Enum.UserInputState identifies whether an input began, changed, ended, or was cancelled. Read it from InputObject or an action callback.

Items

Items5Value

Begin

The input started.

Change

An ongoing input changed.

End

The input ended.

Cancel

The input was interrupted. Clear held-input state without treating the interruption as a completed action.

None

No input state.

Example

Luau
local InputService = game:GetService("InputService")
InputService.Began:Connect(function(input)
  print(input.UserInputState)
end)

InputObject · InputService · Enum.UserInputType