Is there a function to make things Not visible?!

I need an object to disappear when my player is underneath it, what iv'e been attempting is using a 1 frame animation of the object going from it's position to -500Y, so essentially it disappears

problem is this all works on a collider, and have been experiencing lots of bugs doing this..

Is there an easier way to make an object not visible when the player is behind the object, im sure there is, im kinda very new to this so yeah...

please help >.<

this is the code im using so far

 var doorOpened : boolean = false;
var roofDown : boolean = false;
var doorAudio : AudioClip;
var doorShut : AudioClip;
var timer : float = 0.0;
var ObjectVisiblity : Transform;

function Start(){
    ObjectVisiblity.renderer.isVisible = true;  
}
function OnControllerColliderHit(hit:ControllerColliderHit){

    if((hit.gameObject.tag == "house1door")&&(doorOpened==false)){
        openDoor();
        roofDown = true;

    }   

}

function Update(){

    if(doorOpened){
        timer += Time.deltaTime;
    }

    if(timer >= 5){
        shutDoor(); 
    }
    if (roofDown){
     ObjectVisiblity.renderer.isVisible = false;    
    }

}

function shutDoor(){

    var theHouse = gameObject.FindWithTag("house1");
    theHouse.animation.Play("DoorClose");
    theHouse.animation.Play("idle");
    doorOpened = false;

    timer = 0;
}

function openDoor(){

        doorOpened = true;
        var theHouse = gameObject.FindWithTag("house1");
        theHouse.animation.Play("DoorOpen"); 

}

I keep getting thrown errors

Ok guys thanks for all the help :) this is what the finished script looks like, working and all, both answers helped me out in getting the final script :P thanks :D

var doorOpened : boolean = false;
var roofDown : boolean = false;
var doorAudio : AudioClip;
var doorShut : AudioClip;
var timer : float = 0.0;
var ObjectVisiblity : Transform;
var ShowMe = true;

function Start(){
    ShowMe = true;
}
function OnControllerColliderHit(hit:ControllerColliderHit){

    if((hit.gameObject.tag == "house1door")&&(doorOpened==false)){
        openDoor();
        ShowMe = false;

    }   

}

function Update(){

    if(doorOpened){
        timer += Time.deltaTime;
    }

    if(timer >= 5){
        shutDoor(); 
    }
    if (ShowMe== false){
     ObjectVisiblity.renderer.enabled = false;  
    }

}

function shutDoor(){

    var theHouse = gameObject.FindWithTag("house1");
    theHouse.animation.Play("DoorClose");
    theHouse.animation.Play("idle");
    doorOpened = false;

    timer = 0;
}

function openDoor(){

        doorOpened = true;
        var theHouse = gameObject.FindWithTag("house1");
        theHouse.animation.Play("DoorOpen"); 

}

Use renderer.enabled to turn an object's renderer on or off.

renderer.enabled = true; // on
renderer.enabled = false; // off

it makes it invisible every frame, and visible when the game starts.

var ObjectVisiblity : Transform; //the object you want to make invisible

function Start()
{
 ObjectVisiblity.renderer.isVisible = true;
}

function Update()
{
 if(Input.anyKeyDown)
 {
  ObjectVisiblity.renderer.isVisible = false;
 }
}

that turns the object invisible when any key is pressed down.

hope this is what you wanted and that it helps!!!

to add a boolean, you could try:

var ObjectVisiblity : Transform; //the object you want to make invisible
var ShowMe = true; //shows the object from the start unless you change this    

    function Start()
    {
     ObjectVisiblity.renderer.isVisible = true;
     ShowMe = true; // just to be safe!
    }

    function OnTriggerEnter(hit : Collider)
    {
     if(hit.gameObject.tag == "Invisible") //make a new tag and name it Invisible for this to work properly.
      {
       ShowMe = false;
      }
    }
    function Update()
    {
     if(!ShowMe)
     {
      ObjectVisiblity.renderer.isVisible = false;
     }
    }

hope that helps you!