How to disable mobile joystick?

Hello I’ve been trying to disable the mobile joystick controls but I do not want to remove the jump button, if you have any solutions please let me know.

3 Likes

damn I was right about to try it then it got deleted xd

1 Like

It should be possible only to remove the player joystick right? Without removing the jump button.

1 Like

Hey there!

You can disable the mobile joystick without removing the jump button by tweaking the StarterPlayer scripts. Just use the following code:

local StarterGui = game:GetService("StarterGui")
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.TouchControls, false)

This should get rid of the joystick while keeping your jump button intact. Let me know if you need more help!

2 Likes

There’s no Enum TouchControls in Enum.CoreGuiType

an alternate method may be disabling the actual frame itself.

local player: Player = game:GetService("Players").LocalPlayer

local playerGui: PlayerGui = player:WaitForChild("PlayerGui")
local touchGui: ScreenGui = playerGui:WaitForChild("TouchGui")

local mainFrame: Frame = touchGui:WaitForChild("TouchControlFrame")
local thumbstick: Frame? = mainFrame:WaitForChild("DynamicThumbstickFrame", 5) or mainFrame:WaitForChild("ThumbstickFrame", 5)

if thumbstick then
    thumbstick.Enabled = false
end

local function disableOnAdd(child: Instance): nil
    if child.Name == "ThumbstickFrame" or child.Name == "DynamicThumbstickFrame" then
        child.Enabled = false
    end
end

mainFrame.ChildAdded:Connect(disableOnAdd)

Why do you want to do this anyway?

2 Likes

“Why do you want to do this anyway?”

They might want to use their own touch controls.
And yeah, I see where i fumbled up.

2 Likes

Thanks for the solution, I can see why it would seem odd to want to remove only the joystick, guess you’ll have to wait and find out. But thank you so much for the great solution.

2 Likes

Ay I gave a solution without actually checking the code but the code errors if I don’ add a check for keyboard enabled, and when I do, mobile players can still see the joystick, so it just doesn’t become invsible. Idk what I’m doing wrong, does it work for you?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.