I tried:
local play = game.Workspace.Play for i,v in pairs(play:GetChildren()) do if v.BrickColor == ("Neon orange") then v.BrickColor = BrickColor.new("Institutional white") wait() end end
Im thinking since I have a seat in the model, I'll need to check if its a part and make all the parts white, would I have to put (play:FindFirstChild("Part"))? Doesn't work, nothing in output. Help?
local play = game.Workspace.Play for i,v in pairs(play:GetChildren()) do if v.BrickColor.Name == ("Neon orange") then --v.BrickColor.Name was added v.BrickColor = BrickColor.new("Institutional white") wait() end end
When you are referring to the actual string or name of the color, you must put ".Name".
PS: I am currently not at my desktop, so I cannot actually test through Roblox studio, but this is one thing I thought I should mention. Apologies if it does not fix the script entirely.
What you have should work fine, you just have one problem. In line 5, you have parentheses after your if statement. Easy fix, here's the code:
if v.BrickColor == "Neon orange" then --got rid of the parentheses, those are only for BrickColor.new's.