How to disable Movement In Mobile

I want to know how i can disable movement in mobile devices, , in PC this works, but not in mobile

What are you doing to disable movement on PC that doesn’t work on Mobile? I usually like to either anchor the HumanoidRootPart or weld the HumanoidRootPart to an invisible anchored part

	local invisPart = Instance.new("Part")
	invisPart.Transparency = 1
	invisPart.Anchored = true
	invisPart.Parent = workspace
	local character = player.Character or player.CharacterAdded:wait()
	invisPart.CFrame = character.HumanoidRootPart.CFrame
	local weld = Instance.new("WeldConstraint")
	weld.Part0 = invisPart
	weld.Part1 = character.HumanoidRootPart
	weld.Parent = invisPart

I would make sure the drag-to-walk GUI and jump button that appears on mobile isn’t visible when movement is off by disabling the TouchGui

local UIS = game:GetService("UserInputService")
local TouchEnabled = UIS.TouchEnabled
if TouchEnabled then
    local TouchGui = game.Players.LocalPlayer.PlayerGui:WaitForChild("TouchGui")
    TouchGui.Enabled = false
end
1 Like

Oh, i put JumpPower and WalkSpeed to 0

And that doesn’t work on mobile?

Are you setting the speed on the server or the client?

Server, but i mean, on pc works, but you know when you move on mobile you can adjust speed at will, and that makes in mobile doesn’t work

In that case I would just anchor the player or weld them to an invisible part, honestly. They won’t be able to move that way. It’s also safer as almost any exploiter can just turn their walkspeeds back up

1 Like