So what this Module script is suppose to do, it was a modified Roblox Control script and was originally suppose to stop a player from being able to walk when an event is triggered, but recently a Roblox update overhaul broke the script and now players can walk around freely during an event when the Module script is suppose to make them stop walking.
What I would like to know is how do I fix this? This was a Roblox API module that was updated recently I guess and some games like Roblox High School (if I spelled that correctly) and other games that used WalkEnabled = true or WalkEnabled = false to stop people from walking when , for example they open a menu or use chatting, were broken from this update. Could someone help?
–[[ Public API ]]–
function MasterControl:Init()
if self.initialized then return end
self.initialized = truelocal renderStepFunc = function()
if not self.WalkEnabled then return end
if LocalPlayer and LocalPlayer.Character then
local humanoid = getHumanoid()
if not humanoid then return endif self.JumpEnabled and humanoid and not humanoid.PlatformStand and isJumping then humanoid.Jump = isJumping end moveFunc(LocalPlayer, moveValue, true) end
end
local success = pcall(function() RunService:BindToRenderStep(“MasterControlStep”, Enum.RenderPriority.Input.Value, renderStepFunc) end)
if not success then
if RenderSteppedCon then return end
RenderSteppedCon = RunService.RenderStepped:connect(renderStepFunc)
end
endfunction MasterControl:Disable()
local success = pcall(function() RunService:UnbindFromRenderStep(“MasterControlStep”) end)
if not success then
if RenderSteppedCon then
RenderSteppedCon:disconnect()
RenderSteppedCon = nil
end
endmoveValue = Vector3.new(0,0,0)
isJumping = false
enddo
local flat = Vector3.new(1, 0, 1)
local stepped = RunService.RenderStepped
function MasterControl:WalkTo(point, ws)
Hoverboard:unequip(true)
local thisThread = {}
self.walkThread = thisThread
self.WalkEnabled = false
local human = getHumanoid()
local root = human.Parent.HumanoidRootPart
local ows = human.WalkSpeed
if ws then
human.WalkSpeed = ws
end
local initialDirection = ((point-root.Position)*flat).unit
while self.walkThread == thisThread do
local direction = ((point-root.Position)*flat).unit
if math.deg(math.acos(direction:Dot(initialDirection))) > 80 then break end
moveFunc(LocalPlayer, direction, false)
stepped:wait()
end
moveFunc(LocalPlayer, zero3)
if ws then
human.WalkSpeed = ows
end
if self.walkThread == thisThread then self.walkThread = nil end
end
end