so im trying to disable their controls, but they still can walk and cancel the walk path. No errors

controllers = {}

function removeControl()
	repeat wait() until game:GetService("UserInputService").InputEnded
	for i, controller in pairs(game:GetService("ControllerService"):GetChildren()) do
		controller.Parent = nil 
		table.insert(controllers, controller)
	end
end
if game:GetService("UserInputService").InputEnded then
		removeControl()
		game.Players.LocalPlayer.Character.Human.WalkToPoint = Vector3.new(24.4, 0.3, -14.2)
	else repeat wait() until game:GetService("UserInputService").InputEnded
		removeControl()
		game.Players.LocalPlayer.Character.Human.WalkToPoint = Vector3.new(24.4, 0.3, -14.2)

5 comments

0

It's Humanoid, not human. Try using Prints() to see where it stops.

0

k, and i changed humanoids name somewhere

0

it goes through the whole function, but it still doesnt disable the controls >.>

0

Switch the table.insert with controller.Parent. You are trying to add a nil value.

0

still wont let me disable the controls