How To call Health Bar Script From Another Script ?

hello
i have An Empty gameobject i added health bar script to it
as u can see in the picture
it is called ( HealthBar )

and that is the code of HealthBar Script
this Script Called ( HelathBar1)

#pragma strict
public var health : float; // var helath
var texture1: Texture2D; // texture 2d
var mat : Material; // material
var x : float = 0;
var y : float = 0;
var w : float;
var h : float;
function Start () {
health = 1000; // begining health is 100
}
function OnGUI(){
if(Event.current.type.Equals(EventType.Repaint)){ //Is the game being drawn?
var box : Rect = new Rect(x, y, w, h); // the postion of the drawn on screen
Graphics.DrawTexture(box, texture1, mat);  // you draw the bo and texture2d and material
}
}
function Update () {
var healthy : float = 1-(health/100);
if(healthy == 0){



healthy =.1;
}
mat.SetFloat("_Cutoff", healthy);

if ( health <= 0 )
{

GameOver() ;
}


}



function GameOver ()
{


Application.LoadLevel("GameOver") ;
}
function AddHealth ()
{
health +=30 ;
}

what i want is
to make the health Float Increase By ( 30)
if a cube hit a bullet

the problem that
when the bullet hit the cube nothing happen
first i want to ask ?
where should be the script who call the health bar script on ?
on bullet or on the cube ?
secound how to call the health bar and increase the health of it by ( 30 )
and that is my trying
but it is not working

#pragma strict
private var player : GameObject  ; 

private var   HealthScript  :  HealthBar1 ;


function Start () {
//var  HealthScObject = GameObject.FindGameObjectWithTag ("Player");
//if (HealthScObject != null)
//        {
//            HealthScript  =  HealthScObject.GetComponent ("HelthBar1");
//        }
//        if (HealthScript == null)
//        {
//            Debug.Log ("Cannot find 'GameController' script");
//        }


}


function OnTriggerEnter (other : Collider)
{
if ( other.gameObject.tag == "Player")
{

other.GetComponent(HealthBar1).health += 30 ;



}


}


//#pragma strict
//private var player : GameObject;
//function Start () {
//player = GameObject.FindGameObjectWithTag(“Player”);
//}
//function OnTriggerEnter(other : Collider){
//if(other.gameObject == player){
//player.GetComponent(HealthScript).health -= 10;
//}
//}


//#pragma strict
//private var player : GameObject;
//function Start () {
//player = GameObject.FindGameObjectWithTag(“Player”);
//}
//function OnTriggerEnter(other : Collider){
//if(other.gameObject == player){
//player.GetComponent(HealthScript).health -= 10;
//}
//}

it is increase the health by ( 30 )
when it is Hit the HealthBar Empty Object who have the script (HealthBar1 )

if added Health bar script to the bullet it is working also
so what should i do to call it with out added it to the bullet
hope you help me

Does the bullet then hit the trigger box or not?

If you try to print out the collider name here, does that happen?

  • function OnTriggerEnter (other : Collider)
  • {
  • print (other.transform.name);

i solved this problem
can you help me in this quesiton ?