of     1   

tlm129
#183645024Monday, February 15, 2016 4:17 AM GMT

I am working on a project and this might sound like a dumb thing to ask, but how do i make a table out of every part in the model then how do i add something to every part in the model? I.E game.Workspace.Map.Land I need all the Parts aka Land spots. I know the game.ServerStorage.Item:Clone() to get and move a thing but i don't know how to do it in a Table. (sorry if this don't go here this is my first time using the forms.)
izzatnasruna
#183645409Monday, February 15, 2016 4:22 AM GMT

Recursive function. local Everything = {} function Find(Place,className) if #Place:GetChildren() == 0 then print("No children in "..tostring(Place)) else for i,v in pairs(Place:GetChildren()) do if v:isA(className) then table.insert(Everything,v) end end end end print(unpack(Everything))
tlm129
#183645741Monday, February 15, 2016 4:27 AM GMT

Thank you
Zonkman31
#183650675Monday, February 15, 2016 5:41 AM GMT

model = (insert model path) for _,i in pairs(model:GetChildren()) do --insert stuff to do here, variable i is each part. end example: model = workspace.Lamp for _,i in pairs(model:GetChildren()) do if i:IsA("Part") then i.BrickColor = BrickColor.Blue() end end
Zonkman31
#183650750Monday, February 15, 2016 5:42 AM GMT

But the other reply is better for recursive

    of     1