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

How can i make a GetChildren() for workspace?

Asked by 9 years ago

What im trying to make it so it gets the children in workspace and rename it. I'm not sure this is possible or not. Help please

local Total = game.Workspace:GetChildren()
Total.Name = Name

1 answer

Log in to vote
2
Answered by 9 years ago

With editing it's possible, here's a example.

local Total = game.Workspace:GetChildren() -- Gather all the parts.
local Name = "i like cake" -- You forgot this, this is what it'll be changed to.

for _,v in pairs(Total) do -- Not really sure how to explain this part, basically you can refer to it as v now.
    v.Name = Name -- Change the name.
end -- End the for _,v.

If there are any error's please let me know, I didn't test it but I'm pretty sure it'll work.

Ad

Answer this question