|
| 15 May 2012 05:51 AM |
local brick = Workspace.brick function onTouch(brick)
game.Workspace.brick.transparency = 0.5 wait(20) game.Workspace.brick.transparency = 0.0 end
brick.Touched:Connect(onTouch)
It says Connect and Touched isn't a valid member. |
|
|
| Report Abuse |
|
|
Rowpunk
|
  |
| Joined: 20 Nov 2009 |
| Total Posts: 7387 |
|
|
| 15 May 2012 06:30 AM |
Connect is lowercase. I guess it would also be more efficient to write it like
local brick = Workspace.brick brick.Touched:connect(function()
Workspace.brick.transparency = 0.5 wait(20) Workspace.brick.transparency = 0 end)
But I dunno. |
|
|
| Report Abuse |
|
|
|
| 15 May 2012 07:04 AM |
local brick = Workspace.brick
function onTouch(object) object.transparency = 0.5 wait(20) object.transparency = 0 end
brick.Touched:connect(onTouch) |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
| |
|
burton31
|
  |
| Joined: 05 Oct 2009 |
| Total Posts: 89 |
|
|
| 15 May 2012 08:02 AM |
local brick = Workspace.brick brick.Touched:connect(function()
Workspace.brick.transparency = 0.5 wait(20) Workspace.brick.transparency = 0 end) |
|
|
| Report Abuse |
|
|
|
| 15 May 2012 09:31 AM |
Transparency is capitalized.
~thedestroyer115, the most helpful builder!~ |
|
|
| Report Abuse |
|
|
TINISH0TZ
|
  |
| Joined: 20 Nov 2009 |
| Total Posts: 2549 |
|
|
| 15 May 2012 10:20 AM |
You have already stated where the Brick is.
Which means "game.Workspace.brick.transparency = 0.5" is useless.
Change it to "brick.transparency = 0.5"
Also, you wouldn't need the 'local' as it was not written as part of the function.
Change it simply to: brick = Game.Workspace.Brick |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 15 May 2012 10:23 AM |
What's wrong with you guys??
You're not fixing the other error at all ..
>Also, you wouldn't need the 'local' as it was not written as part of the function.
You can access local variables faster than global..
brick.Transparency = .5 |
|
|
| Report Abuse |
|
|