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

How do you solve this?

This wont work

Brick = game.Workspace.Brick

function onTouch() Brick.BrickColor = Dark green wait(3) Brick.BrickColor = Baby Blue end script.Parent.Touched:connect(onTouch)

Can you guys help me, I don't know how to solve this.

1 comment

0

It still doesn't work, I copy your work from first to end checking over all details and it still doesn't work. I even try doing local script and regular script pasting in my brick in workspace over and over.

1 answer

✓ Accepted answer

You're using BrickColor Wrong

How to change the Color of a Brick,

To do this, all you have to do is use BrickColor.new(), like so,

local brick = game.Workspace.Brick

function onTouch() 
	Brick.BrickColor = BrickColor.new("Dark green")
	wait(3) 
	Brick.BrickColor = BrickColor.new("Cyan")
end 
script.Parent.Touched:connect(onTouch)
I wasn't sure if Baby blue was a color code so I changed it. It might be. You can of course change the color name if you wanted to.

Here's a link to some Color Codes.

Here's also a link to the wiki on BrickColor.

Alternatively,

You could use a Color3 value as well, if you wanted to. To do this all you would have to do it use a color3 inside of the BrickColor, like so,

local brick = game.Workspace.Brick

function onTouch() 
	Brick.BrickColor = BrickColor.new(Color3.new(1,1,1))--White
	wait(3) 
	Brick.BrickColor = BrickColor.new(Color3.new(255,0,0))--red
end 
script.Parent.Touched:connect(onTouch)
If you wanted to use this method, you could look through the color codes and change the color very easily, with more control.

I hope I helped!

Good Luck!

If I helped, don't forget to click the accept button below my name next to my answer, it helps a lot.

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