Get height of game obeject 3d

I am trying to make a game in unity,c#, and I want to test the hight of an object, basically display game over if the object has a y value of -5. Plese help

c# unity3d

void OnTriggerEnter (Collider other){
if(other.gameobject.comparetag (“Trigger”) =< 5){
other.gameobject.enabled = true;

} else {
other.gameobject.enabled = false;

this could get you started. The if statement is iffy, so you’ll need to edit that, and this will only work if you are using triggers. Sorry, its the smallest script i could do off the top of my head. The other ways I could think of would be extremely tedious and repetitive.