PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

TouchTapInWorld

The TouchTapInWorld event fires when the user touches/taps their finger on the screen on a UserInputService/TouchEnabled|TouchEnabled device. It is fired when the user taps in the game world.

This event can be used to determine when a user taps the screen and does not tap a GuiObject|GUI element. If the user taps a GUI element, UserInputService/TouchTap will fire instead of TouchTapInWorld.

To check if a user’s device is TouchEnabled, and that touch events will fire, see UserInputService/TouchEnabled.

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 it only fires locally, it can only be used in a LocalScript.

See also

  • UserInputService/TouchTap
  • UserInputService/TouchLongPress
  • UserInputService/TouchMoved
  • UserInputService/TouchPan
  • UserInputService/TouchPinch
  • UserInputService/TouchRotate
  • UserInputService/TouchSwipe
  • UserInputService/TouchStarted
  • UserInputService/TouchEnded

Parameters

Name Type Default Description

A DataType/Vector2 indicating the position of the touch

Whether the user tapped a GUI element