How do I call a boolean event automatically?

Hi guys, first of all I’m fairly new with coding, only 1 month, and it has been a bless, I’m glad I started. And I’ve been trying for 5 days to get this script working properly, what I need is to every time the “BlueTeam” has the Ball the var hasTheBall has to turn false and when he loses the ball, the same var will turn true so I’ll be able to call the events bellow, but no matter what I stated at the function, it simply stays the same regardless of the outcome in the play. I’m sure this is a very noob mistake, but I’m loosing my mind over this issue. Please explain what I’m doing wrong and if you can show me how to fix it. Hey,Thank you!

var hunterBall:Transform;  
var teamA:Transform;  
var teamB:Transform;  
var hasTheBall:boolean;  

function Awake(){  
	hunterBall = GameObject.FindWithTag ("hunterBall").transform;  
	teamA = GameObject.FindWithTag ("BlueTeam").transform;  
	teamB = GameObject.FindWithTag ("OrangeTeam").transform;  
  	}  
  
function Update () 
{    
	if (GameObject.FindWithTag ("OrangeTeam").transform && ("HunterBall"))  
  	{  
	   hasTheBall=false;    
      }  
}  
  
function OnTriggerEnter (other : Collider) {  
	if(other.gameObject.layer==9) {  
           if (hasTheBall == false)  
      {  
        Camera.main.GetComponent(SGUI).teamBScore=Camera.main.GetComponent(SGUI).teamBScore+Random.Range (3,5);  
	    teamA.GetComponent(HunterTeam).hasTheBall = true;  
	    teamB.GetComponent(HunterTeam).hasTheBall = false;  
      }  
	    hunterBall.GetComponent (BallBehavior).OnUltimus();  
	    teamA.GetComponent(HunterTeam).prepareForStart = true;	  	
	    teamB.GetComponent(HunterTeam).prepareForStart = true;	  	
	   }  
  }

how about

function Update () { 
hasTheBall=teamB.GetComponent(HunterTeam).hasTheBall;
}