|
| 27 Jun 2014 03:42 PM |
So I put in this code for a game: ---------------------------------------------- function onClicked() wait(0.5) game.Workspace.Door.Transparency = 1 game.Workspace.Door.CanCollide = false wait(5) game.Workspace.Door.Transparency = 0 game.Workspace.Door.CanCollide = true end
script.Parent.Clicked:connect(onClicked) ---------------------------------------------- What its for is a door that when you click a button, the door disappears for about 5 seconds, before re-appearing. everything works, except the last line, whereas its saying that "Clicked is not a defined function of part". I just need help figuring out what to put there instead of Clicked for it to work. |
|
|
| Report Abuse |
|
|
| |
|
|
| 27 Jun 2014 03:54 PM |
| Gosh someone has to know how to do this. |
|
|
| Report Abuse |
|
|
Stefan631
|
  |
| Joined: 23 Dec 2010 |
| Total Posts: 1350 |
|
|
| 27 Jun 2014 04:27 PM |
| Change Clicked to .MouseClick |
|
|
| Report Abuse |
|
|
|
| 27 Jun 2014 04:28 PM |
| Make script.Parent a clickdetector. You cant just click a brick. |
|
|
| Report Abuse |
|
|
|
| 27 Jun 2014 04:31 PM |
script.Parent.ClickDetector.MouseClick:connect(onClicked) -- replace the last line with this
and put a clickdetector inside the brick |
|
|
| Report Abuse |
|
|