So you want it to randomise between just red, green, blue and yellow? You can just make an array with those colors and then loop through it, right? Or is that not the case.
local colors = { -- all of the potential colors
Color3.fromRGB(245, 205, 48);
Color3.fromRGB(9, 137, 207);
Color3.fromRGB(196, 40, 28);
Color3.fromRGB(0,255,0);
}
local color = colors[math.random(1, #colors)] --the chosen color
local colours = {
“(The RGB value of each color you want.)”;
“(Continue if you want more.)”
}
local finalColourChoice
for i,v in pairs(colours) do
v = tonumber(v)
finalColourChoice = v
end
Now you can take finalColourChoice and apply that RGB value to the material. I hope this works.
local colors = { -- all of the potential colors
Color3.new(245, 205, 48);
Color3.new(9, 137, 207);
Color3.new(196, 40, 28);
Color3.new(0,255,0);
}
local color = colors[math.random(1, #colors)]
--My attempt
while true do
p.BrickColor = BrickColor.new(color,color,color)
wait(1)
end
local colors = {
Color3.fromRGB(245, 205, 48);
Color3.fromRGB(0, 137, 207);
Color3.fromRGB(196, 40, 28);
Color3.fromRGB(0,255,0);
}
local color = colors[math.random(1, #colors)]
while true do
script.Parent.Color = color
wait(1)
end
Hey, should it be BrickCOlor or Color? Sorry I didnt read your edit right after I replied hehe