Problem with movement

I am making a game where a guy moves around in a square I have:

void Update () {
	transform.Translate (speed * Time.deltaTime, 0, 0);
	StartCoroutine(Example());
}

IEnumerator Example()
{
	
	yield return new WaitForSeconds(10);
	transform.Rotate (0, -90, 0);

}

When it reaches 10 seconds it just keeps spinning really fast.

Your issue is that you start a coroutine every frame (during every update call)
So basically, you have your thousands of Example calls in parallel, and they all arrive one after the others at the rotate instruction (like every frame)
Which makes your object turn really fast :slight_smile:

You should do only one call to StartCoroutine(Example()).
It will then wait 10 sec, and then rotate ONCE your object.
Then you would launch the new StartCouroutine, so 10 sec after, it would rotate again, and so on.

Something like:

bool isStarted = false;
void Update () {
     transform.Translate (speed * Time.deltaTime, 0, 0);
     if (!isStarted )
     {
            isStarted = true;
            StartCoroutine(Example());
      }
 }
 IEnumerator Example()
 {         
     yield return new WaitForSeconds(10);
     transform.Rotate (0, -90, 0);
     StartCoroutine(Example());
 }