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
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()
getcontrols:Disable()
getcontrols:Enable()
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!