p = workspace:GetChildren()
for i=1, #p do
if p[i].className == "Part" or "Wedge" then
if p[i].BrickColor == BrickColor.new("White") and p[i].Material == "Slate" then
p[i].BrickColor = BrickColor.new("Grime")
p[i].Material = "Grass"
end
end
end
The problem I'm running into is that there are models in the workspace, and BrickColor & Material are not characteristics of Models.
So if you don't understand, I need this script to change any part or wedge that is colored white, and has the material called Slate.. except it also attempts to change the models in the workspace.

1 comment
Your error was or "wedge", you needed to put p[i].className == "Wedge" although :IsA("BasePart") is a better alternative.