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

how do i accuses a folder via a script that is named after a player?

Asked by
Kaput_0 44
4 years ago

the title explains it well but to reiterate I'm trying to access a folder that is named after a player but I have no clue how to do that here's what code that I have:

game.Players.PlayerAdded:Connect(function(player)
    Instance.new('Folder',workspace)
    workspace.Folder.Name = player.name

    local folder = workspace.. player.Name

    Instance.new('NumberValue',folder)
end)

1 answer

Log in to vote
0
Answered by 4 years ago

You'd do local folder = game.Workspace:FindFirstChild(player.Name).

0
thanks this helped Kaput_0 44 — 4y
Ad

Answer this question