- I want the script to randomly choose a color from the color table.
- The color, black, returns even though it's not in the table.
- Used a function, tried Color3.fromRGB, etc.
local Colors = {Color3.new(255/255, 0/255, 0/255), Color3.new(255/255, 110/255, 0/255), Color3.new(255/255, 255/255, 0/255), Color3.new(0/255, 255/255, 0/255), Color3.new(0/255, 156/255, 255/255), Color3.new(200/255, 0/255, 255/255), Color3.new(255/255, 50/255, 255/255)}
local function generate()
return Colors[math.random(1, #Colors)]
end
while true do
for i, v in pairs(script.Parent:GetDescendants()) do
if v:IsA("Part") then
local c = generate()
v.Color = c
print(c)
v.Transparency = 0
v.Material = "Neon"
end
end
wait(1)
end
Please help, thanks!

2 comments
You could try putting the color values normally, without the divide operation
He would then have to use .fromrgb instead of .new, shouldn't make a difference (Which he already tried) Is it always the color black? Any errors?