How to hide mobile controls

I am trying to simply have a function hide_mobile() and show_mobile() which completely hides the jump button and disables the walking thumbtack for mobile players. Everything I tried (Modal Enabled which is deprecated now, Enabling/Disabling Player Controls, which worked at first (hid dynamic thumbstick), but when reenabled I could not move around at all), and hiding the jump button/ disabling the touch gui did all not work.

Any tips are highly appreciated!

Use GuiService.TouchControlsEnabled. That hides the buttons without having to disable the player’s controls.

when I test that in studio, nothing happens. Will this only work when I test it in game?

It should do. It works for me.



it is still visible for me

Huh? That’s weird.

Try this:

local Controls = require(game.Players.LocalPlayer.PlayerScripts.PlayerModule):GetControls()

--// If you wish to disable the controls:
Controls:Disable()

--// If you wish to re-enable the controls:
Controls:Enable()

this kind of works. I tried that before. The issue is that when I enable the controls again, everything is visible again, but I can’t move at all. This also happens in-game

wait never mind, that works. The problem is that I have this:


when I removed it, it worked. The problem now is that the player does not behave right as it should. I use this player module so the player is able to wallhop/ turn his camera quicker etc.

Put GuiService.TouchControlsEnabled = false before task.wait(1) and get rid of Controls:Disable()

If that doesn’t work then I’m not sure why it isn’t working

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