IEnumerator TitleAnimation() { yield return(null); if (MainScreen1.transform.position == Screen1Pos) { buttonManager.ButtonStart(); StartCoroutine("UIAnimation"); StopCoroutine("TitleAnimation"); yield break; } MainScreen1.transform.position = Vector3.Lerp(MainScreen1.transform.position, Screen1Pos, 0.1f); MainScreen2.transform.position = Vector3.Lerp(MainScreen2.transform.position, Screen2Pos, 0.1f); StartCoroutine("TitleAnimation"); }