Switching Cameras?

Hello,
I found a number of threads about this though non of them seems to solve my problem. anywhoo I need to switch between two cameras by pressing a button, heres my script:

var UpDownSpeed : float;
var CombatCamera : Camera;
var NonCombatCamera : Camera;

function Start ()

{


NonCombatCamera.enabled = true;
CombatCamera.enabled = false;


}


function Update () {

if(Input.GetAxis("Mouse Y") > 0){transform.Rotate(-UpDownSpeed, 0 ,0);}
if(Input.GetAxis("Mouse Y") < 0){transform.Rotate(UpDownSpeed, 0 ,0);}


if(Input.GetKey("space")  CombatCamera.enabled == true  NonCombatCamera.enabled == false)
{

CombatCamera.enabled = false;
NonCombatCamera.enabled = true;

}


if(Input.GetKey("space")  NonCombatCamera.enabled == true  CombatCamera.enabled == false)
{

NonCombatCamera.enabled = false;
CombatCamera.enabled = true;

}



}

The cameras are defined in the editor.
Also, it works for the first change but after that it wont change back.

use Input.GetKeyDown

and else if in the last if statement

Use depth to change which camera will render:

var combatCam : Camera;
var nonCombatCam : Camera;

function Start() {

     // Sets nonCombatCam to a higher depth by default
     // so at the start of the game the nonCombatCam is
     // rendering.
     nonCombatCam.depth = 1;
     combatCam.depth = 0;
}

function Update() {

     // If space is pressed and nonCombatCam
     // is the highest depth (rendering), switch combatCam
     // to highest depth and nonCombatCam to lowest
     // depth, making the combatCam render instead.
     //
     // Else make combatCam the lowest depth and change
     // nonCombatCam to highest depth so that it is rendering.
     if(Input.GetKeyDown(KeyCode.Space)) {
          if(nonCombatCam.depth == 1) {
               nonCombatCam.depth = 0;
               combatCam = 1;
          }
          else {
               nonCombatCam.depth = 1;
               combatCam = 0;
          }
     }
}

this will switch the depths on the cameras, where the camera with the highest depth is rendered and the others are not. Sorry for any discrepancies in the syntax, I’m a C# programmer.