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

How to remove/move the jump button on mobile?

I'm trying to make something mobile compatable, and for this to work, I need quite a few buttons. However, the blasted jump button gets in the way! I know how to remove both the thumbstick and jump button, but I don't want that. I just want to move or remove the jump button. Is there any possible way to do this? Or do I just need to learn how to make my own tricky D-Pad...

1 answer

Destroy the GUI element

The button resides at PlayerGui.TouchGui.JumpButton, so to destroy it you can simply put a script in StarterGui to destroy it every time it is made.

local Player = game.Players.LocalPlayer;
local Gui = Player:WaitForChild("PlayerGui");
Gui.DescendantAdded:connect(function(d)
if d.Name == "JumpButton" and d.Parent.Name == "TouchGui" then
d:Destroy();
end;
end);

That will destroy anything called JumpButton which is a descendant of PlayerGui as soon as it is made.

4 comments

0

I'm actually quite shocked I wasn't able to find this... I'll try it and see how it works

0

You wouldn't have found it. I had to look through the CoreScripts to find out where the control modules put it.

0

This also helped me. Thanks so much!

0

Except when I tried it, nothing happened. It just threw an error saying that didn't exist

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