Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

PlayerScripts is not a valid member of Player!?

Asked by 4 years ago

when i joined the game it doesn't clone the ScriptBreaker Script And it prints an error says "PlayerScripts is not a valid member of Player"

--Variables
local Players = game:GetService('Players')
local SecurityBreaker = script.SecurityBreaker

--ScriptMain
game.Players.ChildAdded:connect(function(player)
    SecurityBreaker:Clone().Parent = player.PlayerScripts
end)
0
Where is PlayerScripts located and what is it? DesertusX 435 — 4y
0
PlayerScripts is Located in Player .-. ImAnonymousBan 24 — 4y
0
I Think You Mean StarterPlayerScripts? Correct Me If Im Wrong. crueluu 169 — 4y

3 answers

Log in to vote
0
Answered by 4 years ago

You don't actually need code to do this, if you just put the script inside 'StarterPlayerScripts' located in 'StarterPlayer', whenever a player joins the game the script will be put into their PlayerScripts.

0
no cuz im making a anti exploit that has a settings if you want anti exploits enabled plz help ImAnonymousBan 24 — 4y
Ad
Log in to vote
0
Answered by 4 years ago

If Your sripts are local then change them to normal ones since locals can't get player scripts service

Log in to vote
0
Answered by
imKirda 4491 Moderation Voter Community Moderator
4 years ago

Server can not access Player Scripts, it's is not possible.

Answer this question