Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is the disable controls script in the right place? its not working!

hi, i wonder why my script is not working how i want, well when i put this script(normal script) in SSS:

local Controls = require(game.Players.LocalPlayer.PlayerScripts:WaitForChild("PlayerModule")):GetControls()---GetControls

Controls:Disable() -----Disable Controls

it dosent work. also i dont know if the enabling script works too (its in the gui button)

local Controls = require(game.Players.LocalPlayer.PlayerScripts:WaitForChild("PlayerModule")):GetControls()---GetControls

Controls:Enable()

so, anybody can help?

3 comments

0

no you ded

0

bruh what does that mean? is that supposed to help?

0

DON'T COMMENT UNLESS YOU THINK IT'LL HELP

2 answers

✓ Accepted answer

instance a Any object named "ControlScript"

IT HAS TO BE NAMED "ControlScript" OR ELSE IT WILL NOT WORK

THEN IT HAS TO BE PUT IN "game.StartPlayer.StarterPlayerScripts"

your object could be a script that you could use or a folder or a part but the point is it will disable all your controls

You Added "LocalPlayer" LocalPlayer Only Works In Local Script Bruh For That Make A function Like

local plr = game.Players
plr.PlayerAdded:Connect(function(player)
	local Controls = require(player:WaitForChild("PlayerModule")):GetControls()---GetControls
end)


Controls:Enable()

i think this is right as i didnt tested it

5 comments

0

It shows unknown global on Controls in the line 7

0

First tell me what are you trying to do then I would fix it

0

this isn't a function, this is an event btw

0

this isn't called a function, an event by the way

0

CoolBlueJay, its an event that uses a function dude

This discussion is preserved as it was. New answers, comments, and votes are closed.