Hi, so I'm making something that will look through whole workspace, including models, and if the parts/unions found is neon and has the Institutional white color, it will be changed to really red.
This is a small part of my script so you understand what's going on:
print("script ran")
for i,v in pairs(game.Workspace:GetChildren()) do
if v:IsA("Part") or v:IsA("UnionOperation") then
if v.BrickColor == BrickColor.new("Institutional white") and v.Material == "Neon" then
v.BrickColor = BrickColor.new("Really red")
end
elseif v:IsA("Model") then
-- Then so on
end
end
This is my full script:
print("script ran")
for i,v in pairs(game.Workspace:GetChildren()) do
if v:IsA("Part") or v:IsA("UnionOperation") then
if v.BrickColor == BrickColor.new("Institutional white") and v.Material == "Neon" then
print("Found one")
end
elseif v:IsA("Model") then
for i,v in pairs(v:GetChildren()) do
if v:IsA("Part") or v:IsA("UnionOperation") then
if v.BrickColor == BrickColor.new("Institutional white") and v.Material == "Neon" then
print("Found one")
end
elseif v:IsA("Model") then
if v:IsA("Part") or v:IsA("UnionOperation") then
if v.BrickColor == BrickColor.new("Institutional white") and v.Material == "Neon" then
print("Found one")
end
elseif v:IsA("Model") then
if v:IsA("Part") or v:IsA("UnionOperation") then
if v.BrickColor == BrickColor.new("Institutional white") and v.Material == "Neon" then
print("Found one")
end
elseif v:IsA("Model") then
if v:IsA("Part") or v:IsA("UnionOperation") then
if v.BrickColor == BrickColor.new("Institutional white") and v.Material == "Neon" then
print("Found one")
end
elseif v:IsA("Model") then
if v:IsA("Part") or v:IsA("UnionOperation") then
if v.BrickColor == BrickColor.new("Institutional white") and v.Material == "Neon" then
print("Found one")
end
elseif v:IsA("Model") then
print("Unscripted model")
end
end
end
end
end
end
end
end

2 comments
"obj.BrickColor.Name"?
Yes; I expect it's slightly faster to get the .Name of a BrickColor and compare that to a string than to create a new BrickColor and compare it with obj.BrickColor. Either method works.