How would i completely disable touch controls without changing walk speed?

trying to make an emote button for my game. everything works except the disabling the mobile controls.
i’ve tried all the solutions i could find, but all of them seem to be outdated in some way.

solutions i’ve tried:

1, UserInputService.ModalEnabled - it hides the joystick and disables the jump button. it only hides it. you can still use it (but it bugs the camera a bit)

2, Disabling the touch controls gui - this has the same problems as ModalEnabled

3, Player.DevTouchMovementMode - whenever i try and change it i just get the error "The current identity (2) cannot setDevTouchMovementMode (lacking permission 5)"

4, playerModule - yeah this just didnt work, dont understand playerModule that much so i cant tell ya why. (Yes i disabled it.)

5, anchoring the humanoidRootPart - forgot this one, it causes the player to float and negates knockback and stuff

Sorry if this is painful to read in any way, this is the 1st real post im making to the DevForums

1 Like

If you don’t wanna use walkspeed this is your best option.

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

-- and when you need
1 Like
local Player = game.Players.LocalPlayer or game.Players[--[[put the player name here lol]]]
local CharScripts = Player["PlayerScripts"]
local Controls = require(CharScripts.PlayerModule)
local getcontrols = Controls:GetControls()

1 Like

I tried playerModule. it doesnt work. only effects the pc controls i think

1 Like
local rootPart = script.Parent:WaitForChild("HumanoidRootPart")
rootPart.Anchored = true

try with this

that causes the player to float in place. which kinda negates all knockback and stuff

You could try making the humanoid PlatformStand

then he just falls over lol

gamer text so i can send this

I found this one out myself, hope this can atleast help someone else.
Changing the position of the frame that hold the control stuff (Player.PlayerGui.TouchGui.TouchControlFrame) offscreen will infact disable the joystick and jump button as its off screen!