|
| 06 Jul 2014 11:00 AM |
local brick = Workspace.P1
function ontouch(part) brick.Transparency = 0 wait(0.5) brick.Transparency = 0.3 wait(0.5) brick.Transparency = 0.5 wait(0.5) brick.Transparency = 0.7 wait(0.5) brick.Transparency = 0.9 end brick.Touched:connect(onTouch)
Output says it tryed to call a nil value, unless i misunderstood the word nil, i dont see any nil values
chk chk boom |
|
|
| Report Abuse |
|
|
| |
|
jode6543
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 5363 |
|
|
| 06 Jul 2014 11:12 AM |
You connected to the function onTouch, but your function is named ontouch; Lua is case sensitive.
~Jode |
|
|
| Report Abuse |
|
|
| |
|
AZant2
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 878 |
|
|
| 06 Jul 2014 11:25 AM |
You can make this simplier by doing a loop. local brick = Workspace.P1
function onTouch() x = 0
repeat brick.Transparency = x wait(0.5) x = x + 0.3 until x == 0.9 end
brick.Touched:connect(onTouch)
But the problem was the case thing. |
|
|
| Report Abuse |
|
|