DestroyByBoundary script not working

hey im making a simple 2D space shooter and my DestroyByBoundary script wont work, i cant see anything wrong with it but shots are not being destroyed as they leave the game area, just clogging up the hierarchy.

here is my script

using UnityEngine;
using System.Collections;

public class DestroyByBoundary : MonoBehaviour

{

void OnTriggerExit2D(Collider2D other)
{
	Destroy(other.gameObject);
}

}

Hey,

Are you trying to build something as the Space Shooter Tutorial game?

Still, a little late and I believe you have solved this problem so, for future reference to others, you may want to try the code below:

using UnityEngine;
using System.Collections;

public class DestroyByBoundary : MonoBehaviour
{
    void OnTriggerExit(Collider other)
    {
        Destroy(other.gameObject);
    }
}

Good luck!