well there is multiple problems with your code:
1.) it uses colour but roblox uses color
2.) some color values aren't valid Roblox color Values
for instance: if you wanted to make a brick really red you would have to write the following code
local part = workspace.part
part.BrickColor = BrickColor.new("Really red")
Do you notice that really red is write as "Really red" and not "Really Red"; that's a convention that all roblox "string color values" follow; so Royal Purple would be "Royal purple"
alternatively to the previous code; you can use Red Green Blue(RGB) values to make make the same effect: example:
local part = workspace.part
part.Color = Color3.new(255,0,0);
the first argument to Color3.new is amount of red, the second one is green and finally the one is blue.
here is one possible way to remake your code:
please note: this is not in the best form in which it could be; so criticism is taken offensively
you will have to adjust the code to fit your setup since i don't actually know your setup
local colors = {
{
"Royal purple",
{98, 37, 209}
},
{
"Hot pink",
{255, 0, 191}
};
{
"Steel blue",
{82, 124, 174}
};
{
"Pastel blue-green",
{ 159, 243, 233}
};
{
"Neon orange",
{213, 115, 61}
};
}
local brickColor_Object = script.Parent.Parent.Colour
local color3_object = script.Parent.Parent.ColourMisc
while true do
wait(129)
local color_index = math.random(1,#colors)
wait(0.1)
brickColor_object.Value = colors[color_index][1]
local RGB_values = color[color_index][2]
local red = RGB_values[1]
local green = RGB_values[2]
local blue = RGB_values[3]
color3_object.Value= Color3.new(red,green,blue)
end
Again, Adjust the code to fit your setup!
so the above code will wait every 129 seconds then it will choose a random number between 1 and the quantity of colors in the table colors. then it will wait 0.1 seconds and will apply the values at the index of the randomly chosen number on the BrickColor value held in the variable brickColor_Object
i assume that you understand the rest bcz it's self explainatory
8 comments
Color3 values must be given a Color3. ¨0, 0, 0¨ is a string, not a Color3. You can do Color3.new(0, 0, 0) to assign it to a Color3. Do the same with BrickColor values, except give them BrickColors like BrickColor.new(¨Royal Purple¨).
so it would be script.Parent.Parent.Colour.Vaule = BrickColor.new("Royal purple") and script.Parent.Parent.ColourMisc.Value = Color3.new(98,37,209) ?
do you notice that ur using "colour" and not "color"?; aslo you would have to extract values from the strings in order to make valid roblox colors
yeah i know im using colour, Im using Color bool values named "Colour" and "ColourMisc"
Its all confusing and i dont understand where i went wrong
*BrickColorValue and a Color3Value
One thing, did you wait 129.1 seconds?
wait(129)If you did wait 129.1 seconds, why don't you use the Value instance instead of StringValue?
Like using BrickColorValue for BrickColors and Color3Value for Color3s
Oh, and check spelling of BrickColors
no i waited 129 seconds, then the extra 0.1 after