Reseting after 3 seconds unity

I have the following question.

I have a board manager in my game, that shows what is happening, for example, if I want to buy a car and you dont have the necessary money in this board appears a message saying “You dont have enough gold”.

    public void setTextMonitor (string mensaje) {
            textScreen = mensaje;
    }

    public IEnumerator DoTheDance() {
       
        yield return new WaitForSeconds(5); // Esperar 3 seconds

        textScreen = "";
       
    }

This is my code and it’s working properly, when the board shows a message after 5 seconds it’s deleted but the board doesn’t shows new messages and I dont know why, probably because the couroutine doesn’t let setTextMonitor method to work properly dunno.

If you have another idea or other method for doing this,
I’d be really grateful

What is textscreen?

How are you starting your coroutine? Overall, with what you posted I don’t see anything wrong.

textScreen is the message of the board panel.

 void Update()
    {
        if(!entraMensaje)
            StartCoroutine(ActualizarPantalla());
        scoreMoney = "Gold : " + gold.ToString();
        scoreLive = "Lives : " + lives.ToString();

    }

    public void setTextMonitor (string mensaje) {
            textScreen = mensaje;
    }

    public IEnumerator ActualizarPantalla() {
        entraMensaje = true;
        yield return new WaitForSeconds(5); // Esperar 3 seconds
        textScreen = "";
        entraMensaje = false; // Cambia para activar nuevo mensaje en pantalla.
    }

I have solved it, I just add a true false to start the couroutine if the message is in the board.

Thanks