#how to disable player control
1 messages · Page 1 of 1 (latest)
have you looked under starterplayerscripts?
thought it'd just go to the players children no?
ho wdo i get player controls from it, cus when i try to even require it it has a whole buncha errors
local PlayerModule = require(game.StarterPlayer.StarterPlayerScripts:FindFirstChild("PlayerModule"))
yeah just requiring it makes everything error for some reason
Is it in a local script?
❌
Also you need to require the player's module not the one in StarterPlayerScripts
It won't work unless it's in a local script
Oh ok
So in a local script have something
local PlayerModule = require(game.Players.LocalPlayer.PlayerScripts.PlayerModule)
local Controls = PlayerModule:GetControls()
-- Then you can do
ControlModule:Disable()
-- and
ControlModule:Enable()
If you do want to control it from the server, consider attributes and remote events.