so first i have the function,
controllers = {}
function removeControl()
local PressedKeys = game:GetService("UserInputService"):GetKeysPressed()
repeat wait() until not next(PressedKeys) -- This should work! :D
for i, controller in pairs(game:GetService("ControllerService"):GetChildren()) do
table.insert(controllers, controller)
controller.Parent = nil
print("function done")
end
end
then i have the activators
local PressedKeys = game:GetService("UserInputService"):GetKeysPressed()
if not next(PressedKeys) then
removeControl()
game.Players.LocalPlayer.Character.Human.WalkToPoint = Vector3.new(24.4, 0.3, -14.2)
else repeat wait() until not next(PressedKeys)
removeControl()
game.Players.LocalPlayer.Character.Human.WalkToPoint = Vector3.new(24.4, 0.3, -14.2)
for some reason the player can still move their character and cancel the path

1 comment
Dude, ive tried to do the same thing and it doesnt work, the roblox wiki sux... I found a way to do it though. Go into player STarterScripts and copy the control script. Paste it into the backpack and then you can disable it and enable it as u plz. Dont forget to disable the on in starterscripts