Problem with Camera switching script

I’m trying to write a script that will switch cameras and back again on mouse click. At the moment, it only switches once. What should I do to make it switch multiple times?

var walking = true;

var camera1 : Camera; 
var camera2 : Camera; 

function Update () {
 if(Input.GetButtonDown("Fire1") && walking == true){
change1();
 }
 
 if(Input.GetButtonDown("Fire1") && walking == false){
change2();
 }

 }

 function change1 (){
camera1.camera.active = true;
camera2.camera.active = false;
walking = false;
print ("Switch1");
 } 

  function change2 (){
camera1.camera.active = false;
camera2.camera.active = true;
walking = true;
print ("Switch2");
 }

Without actually having tested this script, first thing I’d say to try is to simplify the if statements in Update(), like this:

function Update ()
{
	if (Input.GetButtonDown("Fire1")
	{
		if (walking) change1();
		else change2();
	}
}

also, possibly change camera.active to camera.enabled.

I agree, I dealt with this in the past as well and changing “active” to “enabled” fixed it for me.