I have the First Person Controller Capsule and a Capsule. The Capsule is coming towards the player and for some reason it will not destroy it. This the Code is used (C#)
using UnityEngine;
using System.Collections;
public class EnemyScript : MonoBehaviour
{
void OnTriggerEnter (Collider other)
{
if (other.tag == "Player")
{
Destroy (other.gameObject);
}
}
}
The Player IS tagged ‘Player’ and both are Checked ‘is Trigger’.
I already made a laser and a spike that destroy you the script is the same.
Why does it not work?