//respawns the player at their last checkpoint if they die private void CheckIfDead() { if (myHealth.isDead) { //might want to make a lives system later playerBody.position = checkPoint.transform.position; myHealth.health = myHealth.maxHealth; EnemySpawner.ClearSpawnedEnemies(); roomManager.ResetUnclearedRooms(); roomManager.OpenOldDoors(); RoomHandler.SetInactive(); myHealth.isDead = false; } }