What am I doing wrong [Coroutines]

    public void StartAnimatedText()
    {
        Debug.Log("Animate me");
        Time.timeScale = 0;
        Camera.main.GetComponent<UnityStandardAssets.ImageEffects.Blur>().enabled = true;
        StartCoroutine(AnimateText());
    }


    public IEnumerator AnimateText()
    {

        //for (int i = 0; i < (goatText[currentlyDisplayingText].Length + 1); i++)
        for (int i = 0; i < (goatText[currentlyDisplayingText].Length) +1; i++)
        {
            goatTalkingText.text = goatText[currentlyDisplayingText].Substring(0, i);           
            yield return new WaitForSeconds(Random.Range (0.01f, 0.2f));
            //TRY TO ADD AUDIO
        }
    }

And then I have this function, calling it:

    public AutoTyping _scriptAutoType;


                   goodCubeHitCount++;
                    if (goodCubeHitCount == 3)
                    {
                        //Playerprefs that allows you to reach level 2 and stop this function
                        PlayerPrefs.SetInt("Level", 2);
                        Debug.Log("You reached level" + PlayerPrefs.GetInt("Level"));
                        _scriptAutoType.StartAnimatedText();
                        this.enabled = false;
                    }

Well, I get the Log “Animate me” but the coroutine doesn’t start

//Ok... its the:
        Time.timeScale = 0;

//What was doing my coroutine doesn't start, how can i make the time scale be = 0
//for everything except my coroutine?

You can fake it by setting timescale to something like 0.001 and then in your coroutine divide your yield waitforsecond values by a 1000.

That way your program will be running extremely slowly (stopped as far as the eye can see) but your coroutine will run at normal speed from your perspective.

I’ve used this method before in a couple of my games.

First up, instead of just dumping code please give some explanation or context. The easier it is to understand what the problem is the more likely you are to get help.

Secondly, there are other options with regard to managing time. The Time class has some unscaled values, and you can “yield return null;” to have a Coroutine evaluated each frame and manually check the (unscaled) time and do with it as you wish.