Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

1 comment

0

You just use MouseButton1Click in this case...

2 answers

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

you mean this?

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.