Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do we Position all Children?

local parts = game.Workspace.Parts:GetChildren()
local Spawn = game.Workspace.Spawn 

parts.Position = Spawn.Position

-- is there is anything Wrong? am not getting any error in the output 

1 answer

✓ Accepted answer

Use for i, v in pairs() to get the children

here's an example script

for i, v in pairs(game.Workspace.Model:GetChildren()) do
	if v:IsA("Part") then
		v.Name = "Lol"
	end
end

This will name all of the parts in the Model "Lol"

So to position them you'll need to do

for i, v in pairs(game.Workspace.Parts:GetChildren()) do
v.Position = Position
end

This discussion is preserved as it was. New answers, comments, and votes are closed.