How to use gui touch tap?

A button is what I want to use for this mobile script, pc I have a button for

1 Like

I found this on google " Actually MouseButton1Click works on mobile"

You could use UserInputService to detect a mobile tap
And yeah look above at what @SilentSuprion said.

But wouldn’t that be on the whole screen area including the frame?

1 Like

No it wouldnt work that way. It would be like mousebutton1click.

1 Like

look at the solution.

But ignoring the frame entirely. You referenced the userinputservice, not the frame so the script will interact with script thus frame touch or not

1 Like

So why would people use touch tap?

Sorry im not that much of a scripter but i just realized that. oops…

1 Like

Also have you ever tried to see if Mousebutton1Click even it works on mobile?

No worries [30 rice grains , roblox report this if you think I will make 3 burgers in 10 years]

Nope! Testing right now. Pc is booting so please reply after an update

Yeah as you could probably tell, I’m more of a UI Designer. So im not that much of a scripter.

Also I did some research and…

frame.TouchTap:Connect(onTouchTap)

If you need help you might find it on deb hub

Also this is what touch tap is used for made by roblox:

The TouchTap event fires when the player performs a tap gesture on the UI element using a touch-enabled device. A tap is a quick single touch without any movement involved (a longer press would fire GuiObject.TouchLongPress , and moving during the touch would fire GuiObject.TouchPan and/or GuiObject.TouchSwipe ). It fires with a table of Vector2 s that describe the relative positions of the fingers involved in the gesture.

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 TouchTap being fired on a Frame that is GuiObject.Active . Below, the event fires when the cursor briefly pauses (to simulate a tap) and the Frame toggles its GuiObject.BackgroundTransparency . The code for this can be found the code samples.

1 Like

Yeah I cannot localise the mousebutton1click event on a mobile device only, that’s why I need a touch tap script

Does it work?_______________________

It was very vague so no, it didn’t work

It does not. Instead of MouseButton1Click, use MouseButton1Down.

1 Like

Just use Activated:

script.Parent.TextButton.Activated:Connect(function() -- TextButton Example

Nevermind, I figured this out yesterday. You must use a text button not a frame like I was. And use “textbutton.Activated:Connect(function()
end)”