just to be 100% sure can you test by printing “this is a print” in between
game.ReplicatedStorage.Pathfind2:InvokeServer()
and
ContextActionService:UnbindAction(FROZEN_ACTION_KEY)
local MasterControl = require(game.Players.LocalPlayer:WaitForChild("PlayerScripts"):WaitForChild("ControlScript"):WaitForChild("MasterControl"))
MasterControl:Disable() --disable movement
MasterControl:Enable() --disable movement
:Enabled() does not seem to be working… Sometimes it works… Sometimes it does not, I have been getting reports from players saying “I cant move.” and its all after their controls are disabled.
The problem with your original code is that you are using BindActionAtPriority, instead of just BindAction.
When using BindActionAtPriority, the function you provide should return a ContextActionResult that describes if you want to sink the inputs or pass the inputs to the next bound function.