IEnumerator ActivateRepawnPlayer() { //delay for 1 second yield return(new WaitForSeconds(1)); //after the delay, set the new player unit to the respawn point and activate it player.thisT.position = respawnPoint; player.thisObj.SetActive(true); respawning = false; //clear the respawning flag TDS.PlayerRespawned(); }