How to make Object disappear OnTriggerEnter? For prefab shooting

hi, this is my code for making the hotdog hit the enemyBear to make it disappear.

I can get the shooter to work, but it doesn’t work when the object hits the enemyBear.

using UnityEngine;
using System.Collections;

public class HotdogCollision : MonoBehaviour {

	void OnTriggerEnter(Collider other)
	{
	if (other.gameObject.tag == "enemyBear") 
	{ 
		Debug.Log (other.gameObject.name);
			Destroy(other.gameObject,3f); 
		}
	}

}

Two possible reasons

  • If your game is a 2D game then this OnTriggerEnter should be OnTriggerEnter2D
  • Else, your tag is not matching or your enemy bear does’nt have any tag