|
| 17 Jul 2014 04:29 PM |
So far I made it so the door opens when you click it, but I need to make it slide open, instead of jumping 7 blocks.
Doors = script.Parent DoorPiece1 = script.Parent.DoorPiece1 DoorPiece2 = script.Parent.DoorPiece2 ClickDetector = script.Parent.ClickDetector
function move() DoorPiece1.CFrame = DoorPiece1.CFrame + Vector3.new(0,-7,0) DoorPiece2.CFrame = DoorPiece2.CFrame + Vector3.new(0,5,0)
end
Doors.ClickDetector.MouseClick:connect(move)
(The script works, I've tested it) |
|
|
| Report Abuse |
|
|
BlupoV2
|
  |
| Joined: 12 Nov 2012 |
| Total Posts: 543 |
|
| |
|
|
| 17 Jul 2014 05:05 PM |
| Not exactly sure what you mean, but it doesn't need to loop back to closed. I need to make it slide open, instead of jumping open. |
|
|
| Report Abuse |
|
|
BlupoV2
|
  |
| Joined: 12 Nov 2012 |
| Total Posts: 543 |
|
|
| 17 Jul 2014 05:11 PM |
function move()
for i = 1, 7 do DoorPiece1.CFrame = DoorPiece1.CFrame - Vector3.new(0, -1, 0) DoorPiece2.CFrame = DoorPiece2.CFrame - Vector3.new(0, 0.7, 0) end
end
-- Not sure you can use decimals with Vector3's though.
|
|
|
| Report Abuse |
|
|
BlupoV2
|
  |
| Joined: 12 Nov 2012 |
| Total Posts: 543 |
|
| |
|
| |
|