public void Respawn() { TagNodeCompound player = NBTHelper.GetPlayerData(); int x = player["SpawnX"] as TagNodeInt; int y = player["SpawnY"] as TagNodeInt; int z = player["SpawnZ"] as TagNodeInt; Vector3 spawnVec = new Vector3(x, y, z); transform.position = spawnVec; lastPosOnGround = spawnVec; NBTHelper.RespawnRefreshChunks(); Time.timeScale = 1; Health = 20; }