PcoWSkbVqDnWTu_dm2ix
The Developer Hub is now deprecated and information on this page may no longer be accurate. To see our new and improved documentation, please click here. You can read more about the future of documentation here.
Collapse Sidebar

InputEnded

The InputEnded event fires when a user stops interacting via a Human-Computer Interface device (Mouse button down, touch begin, keyboard button down, etc).

The UserInputService has a similarly named event that is not restricted to a specific UI element: UserInputService/InputEnded.

This event will always fire regardless of game state.

See also

  • GuiObject/InputBegan
  • GuiObject/InputChanged

Parameters

Name Type Default Description

An InputObject, which contains useful data for querying user input such as theEnum/UserInputType|type of input, Enum/UserInputState|state of input, and Enum/Position|screen coordinates of the input


Code Samples


Tracking the End of Input on a GuiObject

The following example demonstrates one of many usage examples of handling user input from InputEnded depending on its type.

In order for this to work as expected, it must be placed in a LocalScript and a child of gui.