Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Color3 was working for BrickColor, now it doesn't?

Asked by 8 years ago

This was working a year ago, when I come back to making this simple color changer, it just doesn't work..

while true do
    local X = math.random(0,1)
    local Y = math.random(0,1)
    local Z = math.random(0,1)
    script.Parent.BrickColor = Color3.new(X,Y,Z)
    wait(1)
end

How do I fix this.. don't want any :Random(), :Red(), etc. Did roblox mess something up again?

3 answers

Log in to vote
2
Answered by 8 years ago

You need to use BrickColor.new(r,g,b) instead of Color3.new(r,g,b)

Ad
Log in to vote
0
Answered by 8 years ago

BrickColor

Actually, I don't think it ever did. You can't set a brick to a Color3, because the property is literally encoded across the network as a BrickColor. Your best bet is literally to use BrickColor.Random() or to pass the Color3 into BrickColor3.new to cast it to a BrickColor

Log in to vote
0
Answered by 8 years ago

When dealing with Color3, use Part.Color

Answer this question