Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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.

2 comments

0

Im using a local script.. Should I not be??

0

no put this into a normal script and it will work.:)

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

This discussion is preserved as it was. New answers, comments, and votes are closed.