|
| 28 Sep 2014 09:10 PM |
| I am having problems (once again) in studio. I am trying to create a door that when you click the button once it opens upwards. When you click it again slides down to its original spot. The problem is when I click open again it goes higher up and makes the door unable to close properly. The door goes higher and higher each time I open it again. Anyone know how to prevent this? |
|
|
| Report Abuse |
|
|
IcyFires
|
  |
| Joined: 29 Jun 2013 |
| Total Posts: 5046 |
|
|
| 28 Sep 2014 11:32 PM |
open = false script.Parent.ClickDetector.MouseClick:connect(function(ok) if open == false then --open door code-- end if open == true then --close door code-- end end) |
|
|
| Report Abuse |
|
|
IcyFires
|
  |
| Joined: 29 Jun 2013 |
| Total Posts: 5046 |
|
|
| 28 Sep 2014 11:33 PM |
| I also forgot, change the variable "open" when you open and close the door |
|
|
| Report Abuse |
|
|
|
| 29 Sep 2014 08:35 AM |
| why do people ask for so many scripts here |
|
|
| Report Abuse |
|
|