OnCollisionEnter2D not working?

I have 2 sprites, one with a rigid body and a box collider, and another with just a box collider. When they touch, the OnCollisionEnter2D doesn’t fire, any idea why? First image is of the ‘Player’ and the second one is of an obstacle. The green box highlighting the sprite goes all around it

This is the code I’m using

using UnityEngine;
using System.Collections;

public class KillScript : MonoBehaviour {
void OnCollisionEnter2D(Collision2D hit) {
Debug.Log (“Game Over!”);
}
}

and the player is being moved with velocity, the obstacle doesn’t move

2727973--193882--Capture.PNG
2727973--193883--Capture.PNG

are you sure that your script is on the gameobject with the collider ?

The box in screenshot is a trigger. For that you need to use OnTriggerEnter2D. I think it would also be most logical if that script is added to the box with trigger collider, but it might work on the rigidbody object too.