1 | local parts = game.Workspace.Parts:GetChildren() |
2 | local Spawn = game.Workspace.Spawn |
3 |
4 | parts.Position = Spawn.Position |
5 |
6 | -- is there is anything Wrong? am not getting any error in the output |
Use for i, v in pairs() to get the children
here's an example script
1 | for i, v in pairs (game.Workspace.Model:GetChildren()) do |
2 | if v:IsA( "Part" ) then |
3 | v.Name = "Lol" |
4 | end |
5 | end |
This will name all of the parts in the Model "Lol"
So to position them you'll need to do
1 | for i, v in pairs (game.Workspace.Parts:GetChildren()) do |
2 | v.Position = Position |
3 | end |