Files
fracturepoint/Assets/FROMOLDPROJECTPLEASEORGANISETHESEORDELETE/Scripts/WorldScripts/Teleporter.cs
2026-01-21 10:30:32 -07:00

20 lines
388 B
C#

using UnityEngine;
public class Teleporter : MonoBehaviour
{
public GameObject destination;
void Awake()
{
destination = transform.Find("B").gameObject;
}
private void OnTriggerEnter2D(Collider2D other)
{
if (other.gameObject.tag == "Player");
{
other.transform.position=destination.transform.position;
}
}
}