How can you change a brick's color using a script, I'm afraid I did something wrong in my code....
COMMUNITY QUESTION
How can I color a brick (using script)?
2 answers
Although, this is not a request site I will tell you.
--This is just an example.
workspace.Part.BrickColor=BrickColor.new("Bright blue")
View the whole set of brickcolor codes here http://wiki.roblox.com/index.php?title=BrickColor_codes
--Above codes that will lead the following to fire (example: a function that goes off when a player spawns)
local x = game.workspace.Part -- change so it finds the location of it
x.BrickColor = BrickColor.new(1) -- Change the number to the wanted value
--Other codes and ends
Okay, so this is really simple. Please read this wiki for more information. In short, what that block of code does is:
- 1st it finds the part.
- 2nd it changed the "BrickColor" of the part to the value 1. Read this wiki for information regarding which number represents which color.
Have a great day!
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Don't forget to upvote or accept if it helped!