// Update is called once per frame void Update() { if (canLeave && player.GetComponent <TopDownPlayer>() && Input.GetKeyUp(KeyCode.Space) && StateSaver.areas[(int)togo].name != null) { canLeave = false; StartCoroutine(player.GetComponent <TopDownPlayer>().blackout.FadeInBlack()); GoToScene(); } }