IEnumerator Introduction() { yield return(new WaitForSeconds(0.1f)); while (mov.gameObject.transform.position.x < desiredPosition.position.x) { mov.goRight(); yield return(null); } textBox.SetActive(true); while (!Input.GetKeyDown(KeyCode.Space) && !Input.GetButtonDown("Jump")) { yield return(null); } textBox.SetActive(false); inviswalls.SetActive(true); mov.canMove = true; yield return(null); }