CarlosMX
|
  |
| Joined: 30 Apr 2011 |
| Total Posts: 791 |
|
|
| 13 Mar 2013 12:55 AM |
Is there anything wrong with changing the color of a brick using 'local color = etc..' because I dont want to have to write this line over and over.
So heres my example:
local color = BrickColor.new(95,95,95)
script.Parent.MouseButton1Click:connect(function() if Player.TeamColor == BrickColor.new("Bright green") then local car = game.Workspace.Startinggrid.Cars.Green car.Torso.BrickColor = color |
|
|
| Report Abuse |
|
|
zars15
|
  |
| Joined: 10 Nov 2008 |
| Total Posts: 9999 |
|
|
| 13 Mar 2013 12:59 AM |
| Use GetChildren to automate coloring each part. |
|
|
| Report Abuse |
|
|
zars15
|
  |
| Joined: 10 Nov 2008 |
| Total Posts: 9999 |
|
|
| 13 Mar 2013 01:01 AM |
Also brickcolor needs to have a string or number as input. Use color3 if you want to input 3 numbers:
Color3.new(95/255,95/255,95/255) |
|
|
| Report Abuse |
|
|
CarlosMX
|
  |
| Joined: 30 Apr 2011 |
| Total Posts: 791 |
|
|
| 13 Mar 2013 01:04 AM |
| It worked fine with just 95,95,95 when I tested it a while ago. |
|
|
| Report Abuse |
|
|
zars15
|
  |
| Joined: 10 Nov 2008 |
| Total Posts: 9999 |
|
|
| 13 Mar 2013 04:07 AM |
I bet 95 is color code, so:
BrickColor.new(95) |
|
|
| Report Abuse |
|
|
|
| 13 Mar 2013 06:43 AM |
BrickColor is a value from 0-1...
BrickColor.new(95, 95, 95) shouldn't have worked.
It should be:
BrickColor.new(95/255, 95/255, 95/255) --That will give me a number between 0 and 1 |
|
|
| Report Abuse |
|
|