I tried something that I thought would save time, but it doesnt work, help?
local play = game.Workspace.Test for i,v in pairs(play:GetChildren()) do if v.BrickColor == ("Really black") then v.BrickColor = BrickColor.new("Institutional white") wait() end
Your problem was you're missing an end
. The if
keyword opens a new scope, which needs to be closed with an end
.
local play = game.Workspace.Test for i,v in pairs(play:GetChildren()) do if v.BrickColor == ("Really black") then v.BrickColor = BrickColor.new("Institutional white") wait() end end
local play = game.Workspace.Test for i,v in pairs(play:GetChildren()) do if v.BrickColor == BrickColor.new("Really black") then v.BrickColor = BrickColor.new("Institutional white") wait() end
In order to fix this you may need to figure out what white is in rgb. (Reb, blue, green)
local play = game.Workspace.Test for i,v in pairs(play:GetChildren()) do if v.BrickColor == ("Really black") then v.BrickColor = BrickColor.new(255,255,255) --This should be white wait() end
This should work with what you are trying to do. In rgb, 255 is the highest value and 0 is the lowest. If you made all the values into "0" you would end up getting black.