How Would I disable Mobile Players Control?

I was wondering, How would I disable the Mobile Controls, ie; JoyStick and Jump button.

This gets in the way of my menu, and I need it disabled.

If you play on mobile, in your playergui created “TouchGui” (gui for buttons), so you can delete like this:

-create local script in StarterGui

while task.wait() do
	if script.Parent:FindFirstChild("TouchGui") then
		script.Parent.TouchGui:Destroy()
	end
	break
end

Ugh no.

local PlayerModule = require(game:GetService('Players').LocalPlayer.PlayerScripts:WaitForChild('PlayerModule'))
local controls = PlayerModule:GetControls()

-- To disable the controls:
controls:Disable()

-- To enable them again:
controls:Enable()
2 Likes