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

BrickColor gives random colors for the same number?

I set a part to be a specific color with it's RGB values all the same, for example 255,255,255 or 122,122,122.

However it appears that when I run this script, it changes the RGB values to something like 123,143,151

local angleStrength = 7

math.randomseed(tick())

for i, v in pairs(workspace:GetChildren()) do
	if v.Name == "RockWall" then
		local colorValue = math.random(120,180)
		
		v.CFrame = v.CFrame * CFrame.fromOrientation(math.rad(math.random(-angleStrength,angleStrength)),math.rad(math.random(-angleStrength,angleStrength)),math.rad(math.random(-angleStrength,angleStrength)))

		v.BrickColor = BrickColor.new(Color3.fromRGB(colorValue,colorValue,colorValue))
	end
end

1 answer

✓ Accepted answer

The point is that you should change brick's Color, not the BrickColor. Like this

v.Color = Color3.new(colorValue, colorValue, colorValue)

1 comment

0

GENIUS

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