Why it's doesn't work?

Hey

    var number : int;
     
    function Start() {
    number = Random.Range(1,1);
    }
     
   function OnTriggerEnter( other : Collider ) {
   	Debug.Log("Function is working well!");
    if (other.tag == "Tree") {
    	Debug.Log("Tag tree founded! ");
   	 if (number == 1){
   	 Debug.Log("Work fine!");
    }
    }
    }

This is my script that I made.
When I turn my game on and I go to Collider I get log Debug.Log(“Function is working well!”);
But

Debug.Log("Tag tree founded! ");
   	 if (number == 1){
   	 Debug.Log("Work fine!");
    }

Doesn’t show.
I made new tag and I attach it.
What is the problem in this script ?

I’d guess that the “other” object doesn’t have the “Tree” tag? There’s an easy way to find out…

Change this:

Debug.Log("Function is working well!");

to this:

Debug.Log("Function is working well!");
Debug.Log("Other object's tag is: " + other.tag);

And, I’m not sure what the random number (that will always equal 1) has to do with anything…