DawgINC
|
  |
| Joined: 27 Apr 2012 |
| Total Posts: 156 |
|
|
| 16 May 2012 08:34 PM |
Ok so I want this brick to change to a random color when it touches another brick I have it create the brick the position of another brick and that works but I want it to change to a random color so heres my script:
function cc(hit) if hit.Name == "bri" then hit.BrickColor = BrickColor.new(math.random(1,255)) end end
That was the best I could do I tried and tried nothing please help?
(Yes I am trying to make a Tycoon Kit!
|
|
|
| Report Abuse |
|
|
|
| 16 May 2012 08:46 PM |
Here:
http://www.roblox.com/Tycoon-Making-Tutorial-UPDATES-item?id=33246086
Now, that is the new version, but I do have an older version that was taken over 1,100 times. |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 16 May 2012 09:15 PM |
You never had a connection line. If youdon't have a connection line, Lua will just think it's a regular function.
function cc(hit) if hit.Name == "bri" then hit.BrickColor = BrickColor.random() end end script.Parent.Touched:connect(cc)
|
|
|
| Report Abuse |
|
|
thane1326
|
  |
| Joined: 08 Apr 2009 |
| Total Posts: 867 |
|
|
| 16 May 2012 10:56 PM |
| Thats the stuff right above! \//\\//\\//\\//\\//\\/ |
|
|
| Report Abuse |
|
|