So I'm a very new Scripter, and I'm trying to make the players controls disable when they touch (Pass Through) a block. CanTouch is enabled, CanCollide isn't, I've looked on DevForum and here and every on post that wants to know how to disable controls is always given something like this Script:
1| local gate = script.Parent -- The Block
2| local controls = require(game:GetService("Players").LocalPlayer.PlayerScripts.PlayerModule):GetControls()
3|
4| gate.Touched:Connect(function()
5| controls:Disable()
6| end)
So I put that Script in, and it isn't working. In the Output all it says is " attempt to index nil with 'PlayerScripts' ".
Can anyone give me a script that should work or a way to fix this please?
