I am trying to destroy a gameobject in my scene and it not working . The player is entering the gameobject and the gameobject is suppose to destroy on trigger . I don’t know why its not. Here is my script :
using UnityEngine;
using System.Collections;
public class DS : MonoBehaviour {
public GameObject MedicalBox;
// Use this for initialization
void OntriggerEnter(Collider other) {
if (other.gameObject.tag == "player")
{
Destroy(MedicalBox);
}
}
// Update is called once per frame
void Update () {
}
}