private IEnumerator respawnPlayer() { activedPlayer.enabled = false; activedPlayer.GetComponent <Renderer>().enabled = false; activedPlayer.GetComponent <Collider2D>().enabled = false; yield return(new WaitForSeconds(2f)); activedPlayer.transform.position = this.transform.position; activedPlayer.enabled = true; activedPlayer.GetComponent <Renderer>().enabled = true; activedPlayer.GetComponent <Collider2D>().enabled = true; }