#What is the most efficient way to grab check how many parts are in a model

10 messages · Page 1 of 1 (latest)

hearty python
#

I thought about using a for i loop but i dont think thats the most efficient

fervent spire
#

#Model:GetChildren()

hearty python
#

and how would it tell the difference between a part and something else

fervent spire
#

then u need a for loop

hearty python
fervent spire
#

yes

peak coral
#

for _, part in Model:GetChildreen() do
if part:IsA("BasePart") then
whatever
end
end

#

Im pretty sure that works