Hey guys, I am making kill parts with a single script, how could I get the objects inside these models which are in folders,
GetChildren() only gets the models, how can I get the children of the models for each model as well?
You just call :GetChildren() on the models
Alternatively you can just do Killers:GetDescendants()
and use an if
statement to check if the descendant is a BasePart
So I would have to call GetChildren() for each model?
for i, model in ipairs(Killers:GetChildren()) do
for i, part in ipairs(model:GetChildren()) do
-- do stuff with parts inside models
end
end