How to make a script that chooses between image colors

How can I make a script that randomly chooses between image colors

What do you mean by ‘Image Colors’? Do you have any examples?

0, 85, 255
85, 255, 0
255, 255, 0

You would hold the Color3 values inside a table and use math.random or the Random library to retrieve a random value:

local colors = {
   Color3.fromRGB(0, 85, 255),
   Color3.fromRGB(85, 255, 0),
   Color3.fromRGB(255, 255, 0)
}

local chosenColor = colors[math.random(#colors)]
-- This gets a random index from the total number of indices in the table
-- Essentially: colors [ math.random ( <length of colors> ) ]
1 Like
Image.ImageColor3 = BrickColor.Random().Color

Use the ‘BrickColor’ type’s random constructor and index the returned ‘BrickColor’ value’s ‘Color’ property for a random ‘Color3’ value.