It's supposed to make everything in the workspace blue, but nothing happens!
function underwater() local children = game.Workspace:GetChildren() children.BrickColor3 = "Blue" end
this is probably a stupid mistake, don't hate :(((
Use a for loop to "go through" each child of the workspace and check if it is a part. If it is then we can color it blue. Also, instead of "BrickColor3" you would just say "BrickColor." Another problem is that you have to set a brick color to a brick color. Just saying "Blue" is a string. To create a BrickColor, you do this: BrickColor.new("Blue")
Anyways, here's how I would do it. Like this:
for i,v in pairs(workspace:GetChildren()) do if v:IsA("Part") then v.BrickColor=BrickColor.new("Blue") end end
Dominical, your script only changes colors of parts. Not parts in models, folders, etc. Here's the script that will change the color OF EVERY BRICK BLUE.
function ColorAll(a) for n,o in pairs(a:GetChildren())do if(o:IsA("BasePart"))then o.BrickColor = BrickColor.new('Bright blue') end ColorAll(o) end end ColorAll(workspace)
So, saying GetChildren() creates a table, meaning you have to treat it like one
function underwater() local Parts = game.Workspace:GetChildren() for i, v in pairs(Parts) if v:IsA("Part") then v.BrickColor = BrickColor.new("Really blue") end end