I attached this script to my prefab called “Bullet”. Basically, I want that when my bullet hits The enemy (called Agent) The object Agent will be destroyed.
function OnTriggerEnter (hit : Collider){
if(hit.gameObject.tag == "Agent"){
Destroy(hit.gameObject);
}
}
Either your bullets are too fast for collisions to be detected, or you are missing colliders
– Commander_Quackers