Hello i'm trying to disable the "ControlScript" in PlayerScripts which is a folder in the player (similar to 'PlayerGui') But whenever i try to access the 'PlayerScripts' folder i receive the error saying the folder is not a valid member of player...
I've tried using ":WaitForChild", "Repeat wait()" and even for loops but all 3 of those ways are not working and i keep getting the same result. It is very weird and i remember having this problem a while back with the PlayerGui folder but gave up on that project because of that error.
Here is the script as of current (Server Script):
local path = require(game.ServerScriptService.Modules:FindFirstChild("NoirPhoenix's Pathfinding"))
local Target = workspace.Portal:WaitForChild("Target")
game.ReplicatedStorage.Events.Challenge.OnServerEvent:Connect(function(plr,ePlr)
print(plr)
print(ePlr)
plr.PlayerScripts:WaitForChild("ControlScript").Disabled = true
ePlr.PlayerScripts:WaitForChild("ControlScript").Disabled = true
path.new(plr.Character,Target)
path.new(ePlr.Character,Target)
end)

8 comments
Bcuz you cant get PlayerScripts from server script. You need to fire client from server, and on client get it
i think you could just copy the control script and paste it inside starterplayer in one of the folders and disable it
put it in StarterPlayerScripts i tested it and it works lol
No dude, he cant disable it with script. He need to fire the client from server and on client localscript disable it
I only want to disable it after both players agree to dual.
i suggest just making the humanoid's WalkSpeed and JumpPower to 0 if you dont want the character to move
The idea was to disable the clients movement but my pathfind script to move the plr over to a targetted area.
k