Easy Written By raumil99999

color changing brick Created on: 01-01-2019

how to make a brick color change

Hi! to make a color changing brick or any code you write , you need to know that the input you give should be understandable to the computer , if you want to change the color of the block you will have to use this word "BrickColor" notice the way BrickColor is written? no spaces and the B and C are caps , but if you put "brickcolor" or "Brickcolor" or "brick color" you will get an error , it is suggested to use the output The output tell's you all the information about your game including your scripts! if you get an error it will be something like this : error (and the line number) this will be written in red

game.workspace.Part.BrickColor = BrickColor.new("Really red")

this will be our first line but if you want to add a time gap of 5 secs then you would want to put this before our first line of code

wait(5) -- the 5 in the brackets is the seconds you want it to be so you can change it to any number of seconds

now lets start putting a time gap of our color changing to a 1 second

game.workspace.Part.BrickColor = BrickColor.new("Really red") -- part would come after workspace because it lies in it
-- and brickcolor would come after part because it is going to be peformed on the part

game.workspace.Part.BrickColor = BrickColor.new("Really blue")

and like that you go on

Easy Written By raumil99999

See raumil99999's profile on Roblox