Hello, I am trying to, as the title says, disable the default mobile controls (jump button, joystick) but not disable the buttons that are created by binding actions through ContextActionService.
I’ve tried setting GuiService’s TouchControlsEnabled = false and UserInputService’s ModalEnabled = true, yet both methods, understandably, disable the buttons. Any confirmation that this is impossible or alternative solutions are greatly appreciated.
local UIS = game:GetService("UserInputService")
local PlayerGui = game.Players.LocalPlayer.PlayerGui
if UIS.TouchEnabled and not UIS.MouseEnabled then
if PlayerGui:FindFirstChild("TouchGui") then
PlayerGui.TouchGui:Destroy()
end
end
“This is a LocalScript in StarterCharacterScripts.”
I wasn’t aware that the controls are just GUI elements, figured they would be more abstracted/obfuscated. Wish I could mark both posts as solutions, as this was quite insightful. Thank you for the information, cheers!