|
| 29 Nov 2014 12:06 PM |
I just started scripting again and I forgot mostly everything. I made a script for a door, you can find it here:
local brick = workspace.Door.Main local part = workspace.Door.Handle
function onTouch(part) brick.Transparency = 1 part.Transparency = 1 brick.CanCollide = false part.CanCollide = false wait(1) brick.Transparency = 0 brick.CanCollide = true part.Transparency = 0 part.CanCollide = true end
brick.Touched:connect(onTouch) part.Touched:connect(onTouch)
The problem with this script is that the handle doesn't disappear, the main part of the door does. Also when you touch the door, your body parts disappear? I can't figure out why this happens. |
|
|
| Report Abuse |
|
Quasar99
|
  |
| Joined: 21 Nov 2009 |
| Total Posts: 9328 |
|
|
| 29 Nov 2014 12:25 PM |
problem here is that there are two variables named 'part' the handle, and the part that touches the door you need to rename the argument for onTouch |
|
|
| Report Abuse |
|