Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why wont this disable the players controls?

Asked by 8 years ago

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)
0
It's Humanoid, not human. Try using Prints() to see where it stops. TheDeadlyPanther 2460 — 8y
0
k, and i changed humanoids name somewhere bubbaman73 143 — 8y
0
it goes through the whole function, but it still doesnt disable the controls >.> bubbaman73 143 — 8y
0
Switch the table.insert with controller.Parent. You are trying to add a nil value. TheDeadlyPanther 2460 — 8y
0
still wont let me disable the controls bubbaman73 143 — 8y

Answer this question