How to stop player movement (not walkspeed)

I have found a issue where I can not disable player movement, obviously not setting it to 0, just say controlling the humanoid, literally 0 solutions i can find. The one I found, but breaks on mobile when the player resets… i can’t find a consistent solution.

local ContextActionService = game:GetService("ContextActionService")
local FREEZE_ACTION = "freezeMovement"

ContextActionService:BindAction(
    FREEZE_ACTION,
    function() return Enum.ContextActionResult.Sink end,
    false,
    unpack(Enum.PlayerActions:GetEnumItems())
)

--to unfreeze

ContextActionService:UnbindAction(FREEZE_ACTION)
1 Like

Try this:

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

warn("Disabled Controls")
Controls:Disable()
task.wait(5)
warn("Enabled Controls")
Controls:Enable()
1 Like

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