Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i make my textbutton know when someone taps on it?

Asked by
ZITOI 0
8 years ago

active propreity is true

when i test it with my tablet (android device) textbutton backround color turns grey but when i hold my finger on it but does nothing else.

script.Parent.TouchTap:connect(function()
    script.Parent:Destroy()
end)

can you please help me make it so that my textbutton gets destroyed when it is tapped

0
You just use MouseButton1Click in this case... M39a9am3R 3210 — 8y

2 answers

Log in to vote
0
Answered by 8 years ago
script.Parent.MouseButton1Click:connect(function()
    script.Parent:Destroy()
end)

you mean this?

Ad
Log in to vote
0
Answered by
Vezious 310 Moderation Voter
8 years ago

You'd Want to use TouchTap

script.Parent.TouchTap:connect(function()
    script.Parent:Destroy()
end)

Roblox Wiki's Description of TouchTap is : Fired when a user taps their finger on a TouchEnabled device. For more knowledge, TouchTap

Though, MouseButton1Click would work too.

Answer this question