MouseButton1Down on Mobile

I wrote a code in which i use MouseButton1Down And MousButton1Up to determine how long the player has held down the button, but i tried it out on mobile and it didn’t work so i checked here and people said that it doesn’t work on mobile. Does anyone know any good alternatives for this that i can also use on mobile?

You can try using the TouchStarted and TouchEnded events, however, you’d have to check if the player’s mouse is on the button because these events fire every time the player touches their TouchEnaled screen, not just when they tap a GUI button.

1 Like

You can use UserInputService.TouchStarted and UserInputService.TouchEnded to handle touches in Roblox.
You can check this article to learn more about it.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.