|
| 01 Sep 2014 03:05 AM |
So ive been making a door with cframe but if i walk and touch the door it goes ontop of my head. I dont know how to stop this. Script:
ting = 0 local door = script.Parent
function move() if ting == 0 then ting = 1 for i =1, 30 do i = i+1 door.Position = door.Position + Vector3.new(0,0,0.2) wait(0.1) end wait(5) for i =1, 30 do i = i+1 door.Position = door.Position + Vector3.new(0,0,-0.2) wait(0.1) ting = 0 end end end
door.ClickDetector.MouseClick:connect(move)
|
|
|
| Report Abuse |
|
|
| 01 Sep 2014 03:29 AM |
| There should be 2 if statements first one checks its opened other one checks it close or not. you just added one if so it will open then close or close then open |
|
|
| Report Abuse |
|
Subete
|
  |
| Joined: 10 Jul 2011 |
| Total Posts: 917 |
|
| |