writing DoorAnimation script (not completed)