?
function count(root)local num=0 for _,q in next,root:getChildren()do local s,c=pcall(count,q)if s then num=num+c end end if root:IsA'BasePart'then num=num+1 end return num end
local msg = "There are %i parts in the workspace"
print(msg:format(count(workspace))) |