So I recently needed a script for my game that removes a player's control over their player (changing the movement to be click-to-move)
Code:
for _, controller in pairs(game:GetService("ControllerService"):GetChildren()) do controller.Parent = nil end
The code IS in a LocalScript in StarterGui
You Cannot Delete Controller Service But You Can Override Them In PlayerStarterScripts here's an example (for a local script)
local function onCharacterAdded(character) local humanoid = character:WaitForChild('Humanoid') humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false) humanoid:SetStateEnabled(Enum.HumanoidStateType.Climbing, false) humanoid:SetStateEnabled(Enum.HumanoidStateType.Running, false) humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false) humanoid:SetStateEnabled(Enum.HumanoidStateType.RunningNoPhysics, false) humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated, false) humanoid:SetStateEnabled(Enum.HumanoidStateType.StrafingNoPhysics, false) humanoid:SetStateEnabled(Enum.HumanoidStateType.Swimming, false) end