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