|
| 15 Feb 2013 11:18 AM |
local brick = Workspace.Brick
function OnTouch(part) brick.Transparency = 1 wait(1) brick.Transparency = 0
brick.Touched:Connect(OnTouch) end
When I touch it, it's supposed to change it's Transparency. What have I did wrong? |
|
|
| Report Abuse |
|
|
1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
|
| 15 Feb 2013 11:20 AM |
local brick = Workspace.Brick
function OnTouch(part) brick.Transparency = 1 wait(1) brick.Transparency = 0 end -- This end belongs to the function, if the connect it inside the function, the function will never fire the way you intend it too.
brick.Touched:connect(OnTouch) -- Lowercase c |
|
|
| Report Abuse |
|
|
| |
|
1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
| |
|
|
| 15 Feb 2013 11:52 AM |
local brick = game.Workspace.Brick
-- Try that. |
|
|
| Report Abuse |
|
|
|
| 15 Feb 2013 11:53 AM |
Also the end goes before the Connect.
Also what 1topcop pointed out. |
|
|
| Report Abuse |
|
|
1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
|
| 15 Feb 2013 10:45 PM |
@South Workspace is a built-in variable that is equal to game.Workspace http://wiki.roblox.com/index.php/Workspace |
|
|
| Report Abuse |
|
|