Bullets kill enemy... but continue to travel?

Hello, I’m making a simple FPS game and I’m having this problem. What happens is the bullets shoot fine, kill the enemy fine, but keep traveling on after that. They have a Timed object destructor that destroys them in 4 seconds regardless of what happens to them after they spawn, but how can I make it so that if they destroy an enemy, that also destroys the bullet as well, so it doesn’t continue to fly for the remaining seconds letting it kill other enemies in that path?

Thanks

usin the code you posted shouldnt it be like

function OnTriggerEnter (other: Collider) {
    if (other.gameObject.CompareTag("Bullet")){
   Destroy(other.gameObject);//destroy bullet
        Destroy(gameObject);//destroy enemy
    }
}