wie man ein respaen -Skript in Einheit erstellt

//Unity//
//You Can Change "void Update" to "OnTriggerEnter (Collider other)" and compare tag to something like "RespawnTrigger"  

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class Respawn : MonoBehaviour
{
    void Update()
    {
       if (Input.GetKeyDown(KeyCode.R))
       {
           SceneManager.LoadScene("123");
           Debug.Log("Respawned");
       }
    }
}
Person In A Place