I am using GetChildren like this:
local cars = game.Workspace.Car:GetChildren() for i = 1, #cars do cars[i].BrickColor = BrickColor.Yellow() end
But it justs finds one random part by using the table. What term finds All Children?
I don't see anything wrong in that script, it should work exactly how you want it to. However you should probably using in pairs for this application.
cars = game.Workspace.Car:GetChildren() for i, v in pairs(cars) do if v:IsA("Part") then v.BrickColor = BrickColor.Yellow() end end
c=workspace:children() for i=1,#c do if c[i].className=="Part"then c[i].BrickColor=BrickColor.new("Yellow") --Sorry if did this line wrong elseif c[i].className=="Model"then ci=c[i]:children() for i2=1,#ci do if ci[i2].className=="Part"then ci[i2].BrickColor=BrickColor.new("Yellow") --Sorry if did this line wrong end end end end