Collapse Sidebar


The TouchSwipe event fires when the player performs a swipe gesture on the UI element using a touch-enabled device. It fires with the direction of the gesture (Up, Down, Left or Right) and the number of touch points involved in the gesture. Swipe gestures are often used to change tabs in mobile UIs.

Since this event only requires one finger, this event can be simulated in Studio using the emulator and a mouse. Below is an example of TouchSwipe being fired on a Frame that is GuiObject/Active. Below, the event fires when the Frame moves and changes color slightly. The code for this can be found the code samples.

TouchSwipe event firing on a Frame

See also

  • GuiObject/TouchPan
  • GuiObject/TouchPinch
  • GuiObject/TouchRotate
  • GuiObject/TouchTap
  • GuiObject/TouchLongPress


Name Type Default Description

A Enum/SwipeDirection indicating the direction of the swipe gesture (Up, Down, Left or Right)


The number of touch points involved in the gesture (usually 1)

Code Samples

Bouncing Color Picker

This code sample will cause a Frame (or other GuiObject) to bounce when a swipe gesture is performed on a touch-enabled device (or Studio’s emulator). Horizontal swipes will change the hue of the GuiObject/BackgroundColor3, while vertical swipes will change the saturation.