How to disable jump button in a script

Greetings, i’m trying to make a shop in my simulator and the mobile engagement can easily be hindered by unwanted buttons while there trying to buy weapons etc.

i already tried making players jump height 0 but it didnt disable the jump button

Note: i plan on renabling it when the player pressed the X button.

This may help:
image

local players = game:GetService('Players')

if players.LocalPlayer:WaitForChild('PlayerGui'):FindFirstChild('TouchGui') then
players.LocalPlayer:WaitForChild('PlayerGui').TouchGui.TouchControlFrame.JumpButton:Destroy()
end

Do that, or just set the transparency to 1, then unset the transparency.

2 Likes

So jumpbutton.transparency = 1 instead of jumpbutton:desroy()?

.Visible would work. Transparency would only hide it but not disable it.

2 Likes

Thank you for the help guys it worked