Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

part not changing to intended color? [FIXED]

i made a script that's supposed to change a part's color but when i test it out, the part turns black instead of the intended color?
script:

local hexagon = game.Workspace.Hexagons
local ColorTable = {
	Color3.new("0,0,0"),
	Color3.new("255, 0, 0"),
	Color3.new("213, 115, 61"),
	Color3.new("255, 255, 0"),
	Color3.new("31, 128, 29"),
	Color3.new("33, 84, 185"),
	Color3.new("89, 34, 89"),
	Color3.new("255,255,255")
}

for keyvalue, hexagons in pairs(hexagon:GetChildren()) do
		local randomNumber = math.random(1,#ColorTable)
		local randomColor = ColorTable[randomNumber]
		
		hexagons.Color = randomColor
		hexagons.ColorValue.Value = randomColor
	
end

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.