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?
1 | local CB = script.Parent |
2 |
3 |
4 | CB.Color = BrickColor.Red() |
5 | wait( 0.5 ) |
6 | CB.Color = BrickColor.Blue() |
7 | wait( 0.5 ) |
8 | CB.Color = BrickColor.Green() |
9 | wait( 0.5 ) |
Thanks In advance
This is what you'd want to do:
01 | local CB = script.Parent |
02 |
03 |
04 | CB.BrickColor = BrickColor.new( "Really Red" ) |
05 | wait( 0.5 ) |
06 | CB.BrickColor = BrickColor.new( "Really Blue" ) |
07 | wait( 0.5 ) |
08 | CB.BrickColor = BrickColor.new( "Lime Green" ) |
09 | wait( 0.5 ) |
10 | --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!