OnlineOne
|
  |
| Joined: 14 Jul 2011 |
| Total Posts: 1193 |
|
|
| 05 Jun 2016 08:43 AM |
function colorChange(hit) color.BrickColor = BrickColor.new(hit.BrickColor) end
color.Touched:connect(colorChange)
My example. The Last part is the area that I get an error for. Help please? |
|
|
| Report Abuse |
|
|
BlupoV2
|
  |
| Joined: 12 Nov 2012 |
| Total Posts: 543 |
|
|
| 05 Jun 2016 08:46 AM |
| You don't need to put hit.BrickColor in a BrickColor constructor because it already is a BrickColor. |
|
|
| Report Abuse |
|
|
OnlineOne
|
  |
| Joined: 14 Jul 2011 |
| Total Posts: 1193 |
|
|
| 05 Jun 2016 08:48 AM |
| But without the hit part, it's just saying BrickColor randomly, which is neither a string, a number or a value. It's just like saying 'tree' randomly. The machine won't know what to do. |
|
|
| Report Abuse |
|
|
OnlineOne
|
  |
| Joined: 14 Jul 2011 |
| Total Posts: 1193 |
|
|
| 05 Jun 2016 08:49 AM |
| "(Color3 expected, got table)" |
|
|
| Report Abuse |
|
|
BlupoV2
|
  |
| Joined: 12 Nov 2012 |
| Total Posts: 543 |
|
|
| 05 Jun 2016 08:50 AM |
| color.BrickColor = hit.BrickColor |
|
|
| Report Abuse |
|
|
OnlineOne
|
  |
| Joined: 14 Jul 2011 |
| Total Posts: 1193 |
|
|
| 05 Jun 2016 08:54 AM |
There, I figured it out. It had to be a string.
color.BrickColor = BrickColor.new(tostring(hit.BrickColor))
This works. Thanks for the effort. |
|
|
| Report Abuse |
|
|
zekey101
|
  |
| Joined: 08 Aug 2011 |
| Total Posts: 2499 |
|
|
| 05 Jun 2016 08:55 AM |
alright put this in the brick color = other brick script.Parent.Touched:connect(function(hit) if hit.Parent.Name == "Whatever the name is" then color.BrickColor = hit.BrickColor end end)
that should work
https://www.roblox.com/games/420326453/End-of-the-Line-v7-2a |
|
|
| Report Abuse |
|
|