New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
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 3 months 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 1682 — 3mo
0
and change BrickColor. to BrickColor.new("Color here") Gameplayer365247v2 727 — 3mo
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 1439 — 3mo

1 answer

Log in to vote
0
Answered by 3 months 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