Collision not being detected

Hi, I’m making an online 2d shooter and I have the issue that the projectiles are not colliding with the player.

Here is my code:

`public class DestroyOnHit : MonoBehaviour {

public GameObject Projectile;
public GameObject Red;

// Use this for initialization
void Start () {


// Update is called once per frame
void Update () {

void OnCollisonEnter2D(Collision2D coll) {
	if (coll.gameObject.tag == "Red") {
		Destroy (Projectile);


here are the two objects in question:

edit: for some reason code format is being really weird :confused:

Might be wrong, but your projectile needs to have a rigidbody component for it to trigger collisions.