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

My Brick will not change colors?

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

3 comments

2

Change CB.Color to CB.BrickColor

0

and change BrickColor. to BrickColor.new("Color here")

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.

1 answer

✓ Accepted answer

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!

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