Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

My Brick will not change colors?

Asked by 6 days ago

Im new to scripting and am wanting to create a script that changes colors after 0.5 seconds. But the one I made seemed not to work? Can someone please tell me what I did wrong here?

local CB = script.Parent


CB.Color = BrickColor.Red()
wait(0.5)
CB.Color = BrickColor.Blue()
wait(0.5)
CB.Color = BrickColor.Green()
wait(0.5)


Thanks In advance

2
Change CB.Color to CB.BrickColor yHasteeD 1602 — 6d
0
and change BrickColor. to BrickColor.new("Color here") Gameplayer365247v2 551 — 6d
0
^ it can also be BrickColor.Red() too, just those are the default colors, by using the parenthesis, you get a wider range of colors. greatneil80 1211 — 6d

1 answer

Log in to vote
0
Answered by 6 days ago

This is what you'd want to do:

local CB = script.Parent


CB.BrickColor = BrickColor.new("Really Red")
wait(0.5)
CB.BrickColor = BrickColor.new("Really Blue")   
wait(0.5)
CB.BrickColor = BrickColor.new("Lime Green")
wait(0.5)
--You can use the color palette to find which colors suit what you want

You want to use BrickColor because that is the part's property for color.

BrickColor.new can also be constructed from a number value, but I usually use color names.

Hope this helped!

Ad

Answer this question