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

How would I collect all the names from a section?

Asked by 5 years ago

How would I collect all the names from a section (for example in workshop, every part in there I can collect the names or do other stuff)

1 answer

Log in to vote
0
Answered by 5 years ago
local children = workspace:GetChildren() --set workspace to whatever you want
for i = 1, #children do
    print(i, children[i].Name)
end

This will "collect" all names and print them in console.

Ad

Answer this question