I’ve been searching around and I’m not exactly sure what’s going on with my script. im working on a script that as soon as the player enters it teleports you to a game object. heres what I have:
using UnityEngine;
using System.Collections;
public class Teleport : MonoBehaviour
{
public GameObject objToTP;
public Transform tpLoc;
void Start()
{
void OnTriggerEnter(Collider other)
{
if ((other.gameObject.tag == "Player" && !isPlayed)
{
objToTP.transform.position = tpLoc.transform.position;
}
}
void OnTriggerExit()
{
}