public void RespawnEgg(EggController egg) { egg.gameObject.transform.position = spawn_egg[(int)checkpoint].position; egg.Heal(10); GameObject f = GameObject.FindWithTag("Fox"); f.transform.position = spawn_fox[(int)checkpoint].position; FoxController fox = f.GetComponent <FoxController>(); fox.Heal(10); if (fox.CheckCountdown()) { fox.SwitchSides(); } GameObject cam = GameObject.FindWithTag("MainCamera"); cam.GetComponent <CameraFollow>().Respawn(); }