using UnityEngine; public class TwoWayTeleport : MonoBehaviour { public GameObject toPoint; public float time = 0.1f; static bool pouse = false; void OnTriggerEnter(Collider other) { if (other.tag == "Player" && pouse == false) { pouse = true; other.transform.position = toPoint.transform.position; Invoke("F", time); } } void F() { pouse = false; } }