I am working on a racing game, but the killzone is not functioning properly. It does not detect when the player enters it and it does nothing. However, my finish zone still works with identical code. The tags are correct within unity.
`public class KillZone : MonoBehaviour
{
public GameObject Zone;
public GameObject Car;
public Vector3 Spawn;
void Start()
{
Spawn = Car.transform.position;
}
void OnTriggerEnter(Collider other)
{
if (other.tag =="killzone")
{
Car.transform.position = Spawn;
}
}
}`