mage11561
|
  |
| Joined: 03 Sep 2008 |
| Total Posts: 13217 |
|
|
| 12 Aug 2011 04:25 PM |
a = script.Parent function onClicked() a.Transparency = a.Transparency + 0.2 end if a.Transparency >= 1 then a:remove() end script.Parent.ClickDetector.MouseClick:connect(onClicked)
I'm making a brick that when you click it, its transparency increases, and I want the brick to be removed when the transparency is greater than/equal to 1, but the brick isn't being removed, BUT the transparency is being increased each time I click the brick. What's the problem here? Thanks in advance :) |
|
|
| Report Abuse |
|
|
| 12 Aug 2011 04:29 PM |
a = script.Parent function onClicked() a.Transparency = a.Transparency + 0.2 if a.Transparency >= 1 then a:remove() end end script.Parent.ClickDetector.MouseClick:connect(onClicked)
|
|
|
| Report Abuse |
|
mage11561
|
  |
| Joined: 03 Sep 2008 |
| Total Posts: 13217 |
|
| |