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

Instance.new not working with game.Players.PlayerAdded...?

Asked by
HjmanYT -1
6 years ago

I have this and it's not adding a folder to the player.

game.Players.PlayerAdded:connect(function(plr)
    local invfolder = Instance.new("Folder")
    invfolder.Name = "InventoryFolder"
    invfolder.Parent = plr
    print("Added Complete")
end)

2 answers

Log in to vote
0
Answered by 6 years ago

are you sure this isnt working? it works when i put it in. Make sure you are using a script and not a local script.

Also, when you run the game, open up your Explorer window and open Players, then click your player name and see if you have the folder in there.

0
Im using a local script.. Should I not be?? HjmanYT -1 — 6y
0
no put this into a normal script and it will work.:) PoePoeCannon 519 — 6y
Ad
Log in to vote
0
Answered by
GingeyLol 338 Moderation Voter
6 years ago
Edited 6 years ago
game.Players.PlayerAdded:Connect(function(plr)
    local invfolder = Instance.new("Folder")
    invfolder.Parent = plr
    invfolder.Name = "InventoryFolder"
    print("Added Complete")
end)

Answer this question