help with music slow down script

this is an error that has popped up from day dot of a project im working on, near finished also. but this error is constant, and i have not been able to figure it out yet.

but i have this script which slows down time and volume when the player dies. but when it reaches the bottom, it spews error messages, until i start the level again.

the errors are “Time.timeScale is out of range. Needs to be between 0 and 100. UnityEngine.Time:set_timeScale(Single)”

i just don’t know how to get rid of the errors. if anyone can help, that would be grand. script is at the bottom

public Canvas deathScreen

voidUpdate () {
   if(GameObject.Find("Player") == false){
      deathScreen.enabled = true;
      if(Time.timeScale > 0){
         Time.timeScale -= 0.01f;
       }
      if(GetComponent<AudioSource>().pitch > 0.0f){
         GetComponent<AudioSource>().pitch -= 0.01f;
         GetComponent<AudioSource>().volume -= 0.01f;
       } else {
         GetComponent<AudioSource>().Pause();
       }
    }
}

They way you wrote it, if your Time.timeScale is bigger than 0, then every frame you lower it by 0.01f;
and the error tells you, you can’t set it lower than 0,
while you are lowering every single frame…

cool thanks for that. i had a feeling, but still trying to keep the effect it has, though it will have to be done another way.

thanks