|
| 18 Aug 2012 01:16 PM |
Makes it invisible ontouch then changes back to normal.
local brock = workspace.brick
function onTouch (part) brick.Transparency = 1 wait(3) brick.Transparency = 0 end
Brick.Touched:connect (onTouch)
Is this right? Im a bigginer |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2012 01:19 PM |
You have to, have to, HAAAAAVE TOOOOO, make sure that all you variables are the correct capitalization and spelling. For example:
this = 1
print(This) -- will print 'nil' because "this" and "This" aren't the same thing. |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 18 Aug 2012 01:20 PM |
^
this = 1 This = this print(This)
:3
But yeah, arceus is right. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 18 Aug 2012 01:25 PM |
"local brock = workspace.brick"
Here you defined "brock". If you want to reference the brick, you will need to use "brock" unless you assign a new variable to the brick.
"Brick.Touched:connect (onTouch)"
Here you use "Brick" instead of "brock". That won't work because, to Lua, they're completely different words that mean completely different things. You need to change "Brick" to "brock" to connect the event.
"brick.Transparency"
Here you used another word with a completely different meaning. You need to replace "brick" with "brock". One little letter can and will completely ruin your script. |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2012 01:28 PM |
| sorr that was a spelling mistake =) |
|
|
| Report Abuse |
|
|
| |
|
|
| 18 Aug 2012 01:33 PM |
| so if i had no spelling mstakes it would be right |
|
|
| Report Abuse |
|
|
| |
|