The TouchSwipe event fires when a user swipes their fingers on a
This event can be used to determine when a user swipes their fingers on the screen of their device and the direction that the user swiped.
For more precise tracking of touch input movement, use using
To check if a user’s device is TouchEnabled, and that touch events will fire, see
This event only fires when the Roblox client window is in focus. For example, inputs will not be captured when the window is minimized.
As this event only fires locally, it can only be used in a
An `Enum/SwipeDirection, indicating the direction the user swiped
Number of touches (e.g. fingers) involved in the gesture
Indicates whether the game engine internally observed this input and acted on it. Generally this refers to UI processing, so if a button was touched or clicked from this input,
Touch Swipe a GUI
The example below demonstrates the
UserInputService/TouchSwipe|TouchSwipe event by
GuiObject|GUI element’s position 100 pixels in the direction of the swipe according to the value of the
In order for this example to work as expected, it must be placed in a
LocalScript that is parented to the gui being swiped.