using UnityEngine; public class respawn : MonoBehaviour { private GameObject player; [SerializeField] private Transform respawnPoint; void Start() { player = GameObject.Find("Frank"); } void Update() { } private void OnCollisionEnter2D(Collision2D other) { if (other.gameObject.CompareTag("Player")) { player.transform.position = respawnPoint.position; Debug.Log("Respawn: Move"); } } }