Color3Value object being goofy

Hello, I am having troubles with the said object.

I have a folder of Color3Value objects, and the value of each one is a different color. For example, the value of the object named “Blue” is [51, 88, 130].

I have a script that randomly chooses one of these objects and sets a brick to the value of the randomly chosen object. Except when it runs, the brick is always turned black. Now as a test I printed the value, and here is what the same blue value becomes: 0.2, 0345098, 0.509804. Any ideas why it’s goofing up the values?

Here’s the code just in case it matters.

local table = colorPack:GetChildren()

local random = table[math.random((#table))]

print(random)

print(random.Value)

Maybe change the variable “table” to “Table” and “random” to “Random”, because I think table and random are reserved variables and you can’t use them.

Thanks for your reply. I just tried it, and unfortunately it didn’t change anything.

Hold on, why did you do double brackets in math.random, there should only be () not (())

Probably just a mistake. I don’t think that’d make a difference, but I’ll remove it anyways. Thanks for pointing it out.

That isn‘t a small mistake cause I think with double brackets the math.random might now work

It didn’t fix it unfortunately.

local Colors = workspace.Colors:GetChildren()
local RandomColor = Colors[math.random(1,#Colors)]
workspace.Baseplate.Color = Color3.fromHSV(RandomColor.Value:ToHSV())

That worked great, thank you very much for taking the time to do that. If you don’t mind (you’ve already done enough), could you explain to me why mine didn’t work but yours did?