So, I used a script:
function color() Game.Workspace.Part.BrickColor = BrickColor.new("Really red") end script.Parent.MouseButton1Down:connect(color)
But I want a more simple way to change more other than cloning it and changing the part names.
To change a part colour, this is the best way
There are many ways to change multiple part colors. I will show & explain a few ways. Also, because you are changing a color w/ a GUI, you make your question a bit confusing to if you want it for just a GUI, or if you're trying to change it in-game.
A not so efficient way could be naming each part and doing game.Workspace.Part100.BrickColor = BrickColor.new("Black")
and take forever to write your code.
Another way can be using the GetChildren()
method in a Generic loop
. You could just model all the parts together (That you want to have a color change) for it to be easier. Example:
local Model = game.Workspace.PartCollection local Parts = Model:GetChildren() for _, Part in pairs(Parts) do Children.BrickColor = BrickColor.new("Really red") end
If this helps, help me with an Up Vote and Accept!