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

why this add folder to player script isnt working?

Asked by 4 years ago
Edited 4 years ago

so i made a script that inserts a folder into a player, then inserts a value into it. so the issue is that the folder appears but its empty. not getting any errors.

game.Players.PlayerAdded:Connect(function(plr)
    local folder = Instance.new("Folder",plr)
    folder.Name = "bdbfolder"
    local bdb = Instance.new("IntValue",folder)
    bdb.Name = "bdb"
end)

1 answer

Log in to vote
0
Answered by 4 years ago

Try this

game.Players.PlayerAdded:Connect(function(plr)
    local folder = Instance.new("Folder")
    folder.Parent = plr
    folder.Name = "bdbfolder"

    local bdb = Instance.new("IntValue")
    bdb.Parent = folder
    bdb.Name = "bdb"
end)
0
nope TFlanigan 86 — 4y
0
put it in the serverscriptservice with a normal script EnzoTDZ_YT 275 — 4y
Ad

Answer this question