Help with Mobile TextButton Screen

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

Allow mobile players to use ability mobile button located in a tool

  1. What is the issue? Include screenshots / videos if possible!

The button works and fires the remote event; however, even with a debounce in the script, mobile players are able to unequip and re-equip to override the debounce; thus, allowing the to use the ability however much they want.

I had the same issue with PC players using userinputservice; however, I was able to fix this by using a BoolValue and adding tool.equipped to fix the issue.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I am a noob scripter, but I have tried tool.equipped but I get an error indicating that equipped is not a valid member of textbutton. Any help is appreciated!

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

Here is a copy of the script located in a textbutton which is located in a screengui and in an image label.

local name = 1
plr = game.Players.LocalPlayer
debounce = false
cooldown = 50

script.Parent.MouseButton1Click:Connect(function()
if name == 1 then
name = 2
if debounce == false then
game.ReplicatedStorage[“Almighty Push”]:FireServer()
wait(script.Parent.Parent.Parent.Value.Value)
debounce = true
wait(cooldown)
debounce = false
name = 1
end
end
end)