It’s also coloring it the colors I didn’t list.
Script:
local colors = {
"Pastel Blue",
"Artichoke",
"Dark stone grey",
"Salmon",
"Slime green",
"Storm blue",
"Crimson",
"Gold",
"Neon orange",
"Fawn brown",
"Pearl",
"Medium stone grey"
}
for _, colorparts in pairs(script.Parent:GetChildren()) do
if colorparts.Name == "Color" and colorparts:IsA("BasePart") then
colorparts.BrickColor = BrickColor.random(colors)
end
end
Hello, if you want to change the color of all parts then you should use the following script:
local colors = {
"Pastel Blue",
"Artichoke",
"Dark stone grey",
"Salmon",
"Slime green",
"Storm blue",
"Crimson",
"Gold",
"Neon orange",
"Fawn brown",
"Pearl",
"Medium stone grey"
}
local Color = BrickColor.random(colors)
for _, colorparts in pairs(script.Parent:GetChildren()) do
if colorparts.Name == "Color" and colorparts:IsA("BasePart") then
colorparts.BrickColor = Color
end
end
Ah, I just realized. BrickColor.random isn’t even suppose to take in an argument. It just outputs a random BrickColor, any possible one. So, we need to create our own list, like this:
local brickcolor = {
BrickColor.new("Pastel Blue"),
BrickColor.new("Artichoke"),
BrickColor.new("Dark stone grey"),
BrickColor.new("Salmon"),
BrickColor.new("Slime green"),
BrickColor.new("Storm blue"),
BrickColor.new("Crimson"),
BrickColor.new("Gold"),
BrickColor.new("Neon orange"),
BrickColor.new("Fawn brown"),
BrickColor.new("Pearl"),
BrickColor.new("Medium stone grey")
}
local colorlist = brickcolors[math.random(#brickcolors)]
for _, colorparts in pairs(script.Parent:GetChildren()) do
if colorparts.Name == "Color" and colorparts:IsA("BasePart") then
colorparts.BrickColor = colorlist
end
end