I am currently having an issue where i'm trying to disable the player's movement via GUI but when I click the button it can't seem to locate PlayerScripts. Here is the error:
16:42:29.608 - PlayerScripts is not a valid member of Player 16:42:29.609 - Stack Begin 16:42:29.609 - Script 'ServerScriptService.Controlling', Line 6 16:42:29.609 - Stack End
and here is my code:
local script:
script.Parent.MouseButton1Click:Connect(function()
local P = game.Players:FindFirstChild(script.Parent.Parent.TextBox.Text)
game.ReplicatedStorage.Events.Disable:FireServer(P)
end)
server script:
--Disable Movement--
Events.Disable.OnServerEvent:Connect(function(P)
local controls = require(P.PlayerScripts.PlayerModule):GetControls()
controls:Disable()
end)
Thanks, for the help, in advance!

4 comments
Try debugging it, loop through P and find everything. Scripts do have access to PlayerScripts I am not sure, I will be trying to reproduce this and tell you if I find a solution.
Wait why do you need a RemoteEvent for this in the first place? You can just disable it in the Local Script.
I'm trying to make a sort of Admin GUI where I can disable any player's movement by typing in their name, clicking a button and it will disable their movement, its for a horror style game im making for me and some friends and I want to be able to trap them in place.
If that's the case I suggest you anchor their HumanoidRootPart, use a BodyPosition or there are many other ways to freeze them. I can't seem to find PlayerScripts either.