Closing sliding door Raycasting

Hello,

Currently we have two sliding doors which slide apart (like a convenience store). The doors open using Raycasting, but they do not close. How do we get the doors to close?

Also, one door slides open then the other door slides open when the FPS gets close. How do we get both doors to slide open at the same time?

Below is the code we use to open our doors with FPS controller.

    var rayCastLength = 5;
function Update()
{
      var hit : RaycastHit;
      //check if we're colliding
      if(Physics. Raycast(transform.position, transform.forward, hit, rayCastLength))
      {
//...with a door_open
if(hit.collider.gameObject.tag =="door")
{
// open the door!
hit.collider.gameObject.animation.Play("door_open");
}
       }
}

It would be a lot easier to use iTween, then you don't have to import any animation, just write the sliding in your script.

I have it in my game :

   var hit : RaycastHit;

    if(Physics.Raycast(transform.position,transform.forward,hit,rayCastLength))
    {
        if (hit.collider.gameObject.tag =="door1")
            {
            openDoor1();    
            }

function openDoor1(){

                iTween.MoveTo(door1, {"x" : 16.2,"time" : 3, "transition" : "spring"});
                yield WaitForSeconds (3);
                iTween.MoveTo(door1, {"x" : 19.5, "time" : 3, "transition" : "spring"});    

        }

Just take a look at iTween, BTW, it' s free.