Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I color a brick (using script)?

Asked by 8 years ago

How can you change a brick's color using a script, I'm afraid I did something wrong in my code....

2 answers

Log in to vote
0
Answered by 8 years ago

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

0
Don't forget to upvote or accept if it helped! NotNowSkid 10 — 8y
Ad
Log in to vote
0
Answered by 8 years ago
--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!

Answer this question