while true do
if game.Workspace.MaxVal.Value >= 5 then
local Parts = game.Workspace:GetChildren()
for i = 1, #Parts do
if Parts[i].Name == "Partay" or "Partay1" or "Partay2" or "Partay3" or "Partay4" or "Partay5" then
Parts.BrickColor = BrickColor.new("Parsley green")
end
end
end
wait(.2)
end
There's no error that's being outputted, but it does go through past that second if statement if I tell it to print something. It might be using the original variable, and not changing it based off of that, but I don't know.

6 comments
Yeah, i've tried that before I asked on here. I did it again just to see, and I get the error of "BrickColor is not a valid member of Script"
Is Partay, Partay1, Partay2, Partay3, Partay4, or Partay5 a script?
With what I have, I have a code panel thing. Partay are the buttons that are just there, and the other partays with numbers are the ones that actually do something progressive. I named them that just to call them easier in a different script.
So Partrays are a TextButton?
Oh, my bad. By buttons I was talking about their purposes. They are just parts.
Try it now. I've edited it.