Hello everyone,
So i have recently been working of one of my games and one of the problem I have recently encountered is that the touch controls on mobile interfere with the UI the player has to interact with. The UI is a SurfaceGui so it doesn’t go over the player controls, and the camera is being manipulated to be directly in front of the UI.
I have tried to change the player’s control from Dynamic Thumbstick to Touch To Move (While the player is focused on the UI the player speed is 0), But the player control does not seem to change and the Dynamic Thumbstick is still the same control while being focused on the UI.
Here is the code I use for camera manipulation and control change:
local player = game.Players.LocalPlayer
game.Workspace.RoomOne.CameraPart.ProximityPrompt.Triggered:Connect(function()
wait(0.05)
workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
workspace.CurrentCamera.CFrame = workspace.RoomRoom.CameraPart.CFrame
player.Character.Humanoid.WalkSpeed = 0
player.Character.HumanoidRootPart.CFrame = workspace.RoomOne.RoomOneTeleportPart.CFrame
game.Workspace.CurrentCamera.FieldOfView = script.Parent.PcOne.BackGround.TransparencyCreator.ChangeSets.BackGroundV2.Storage.ScrollingFrame.FovValue.Value
(Player Movement Manipulation Part)game.StarterPlayer.DevTouchMovementMode = Enum.DevTouchMovementMode.ClickToMove
end)
Even when the player has triggered the above function the movement mode does not change, and interferes with the UI.