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
5 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:

1game.Players.PlayerAdded:Connect(function(player)
2    Instance.new('Folder',workspace)
3    workspace.Folder.Name = player.name
4 
5    local folder = workspace.. player.Name
6 
7    Instance.new('NumberValue',folder)
8end)

1 answer

Log in to vote
0
Answered by 5 years ago

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

0
thanks this helped Kaput_0 44 — 5y
Ad

Answer this question