Fade in 3d Text

So the other day I asked a question about fading 3d text, and got some awesome feedback that helped me out a lot. Unfortunately, there’s one issue that’s dogging me now, and am hoping someone might be able to assist me in finding the solution. Here it goes:

You have to climb to the top of a tower. At the highest floor is a boss. Stuff’s about to get real. A 3d text appears over said boss’ head proclaiming what the boss is, and it’s name. You take a step closer, the text fades away, and it’s on!

Well, in a perfect world.

Instead, here’s what we see:

It's almost like a billboard...

I’ve found the way to fade OUT the text when I get close enough, but the text is always there beforehand, like a giant billboard advertising “free boss fight!” for miles around. It can be seen through walls (cubes) trees, you name it. I’ve tried modifying the script by adding another distance variable, using a wait command to just show the text at minimum distance, then fade it out, etc. And nothing I’ve tried has worked. Am hoping that someone might be able to see what I’m missing. Thanks, and God bless.

var fadeIn : boolean;
    var fadeOut : boolean;
    var fadeSpeed : float = 0.01;
    var minAlpha : float = 0.0;
    var maxAlpha : float = 1.0;
    var minDistance = 30;
    var target : Transform;
    var myTransform : Transform;

    function Awake()
    {
    myTransform = transform;
}

    function Start()
    {

    target = GameObject.FindWithTag("Player").transform;

    }

    function Update()
    {

    if(fadeIn && !fadeOut)
    FadeIn ();

    if(fadeOut && !fadeIn)
    FadeOut ();

    if(renderer.material.color.a <= minAlpha)
    {
    fadeOut = false;
    if(Vector3.Distance(myTransform.position, target.position) > minDistance)
    {
    fadeIn = true;
    }
    }

    if(renderer.material.color.a >= maxAlpha)
    {
    fadeIn = false;
    if(Vector3.Distance(myTransform.position, target.position) < minDistance)
    {
    fadeOut = true;
    }
    }
    }

    function FadeIn()
    {
    renderer.material.color.a += fadeSpeed;
    }

    function FadeOut()
    {
    renderer.material.color.a -= fadeSpeed;
    }

Try this … http://wiki.unity3d.com/index.php?title=3DText

public class HealthFlash : MonoBehaviour {

private float _speedInc=2.0f;
private float _colorCom;
private bool _pingPong;
private float _weightFlash=0;
private float _speed;
private bool _enaHealthFlash;
void OnEnable(){
_colorCom=1.0f;
_pingPong=true;
_weightFlash=0.0f;
_speed=_speedInc;
_enaHealthFlash=false;
renderer.material.color=new Color(1,1,1,1);
}
 
void Update(){
if(_enaHealthFlash){
BossHealthFlash();
}
}
public void OnHealthFlashSpeedInc(){
_enaHealthFlash=true;
_speed +=_speedInc;
}
public void DisableHealthFlash(){
_enaHealthFlash=false;
}
private void BossHealthFlash(){
_weightFlash +=Time.deltaTime*_speed;
if(_pingPong){
_colorCom=Mathf.Lerp(0,1,_weightFlash);
if(_colorCom==1){
_weightFlash=0;
_pingPong=false;
}
}
if(!_pingPong){
_colorCom=Mathf.Lerp(1,0,_weightFlash);
if(_colorCom==0){
_weightFlash=0;
_pingPong=true;
}
}
renderer.material.color=new Color(_colorCom, 1,_colorCom, renderer.material.color.a);
 
}

}