Rigidbody and BoxColliders not colliding[RESOLVED]

I have 2 2D Sprites: An Enemy AI and a Player.

Player Components: Rigidbody2D (isKinematic) and BoxCollider2D
Enemy AI Components: Rigidbody2D (isKinematic) and BoxCollider2D

The enemy sprite is programmatically moved by its rigidbody. I put a debug.log(“Collided”) call in the player’s script under the onCollisionEnter2D function but they are still moving through each other. I checked their layer and their z position to double check if I pulled a wonky.

void onCollisionEnter2D(Collision coll)
{
 if(coll.gameObject.tag == "Enemy")
    {
      Debug.Log("Ow");
     }
}

One of the rigidbodies must not be kinematic. I think you want the enemies to move and the player to remain unaffected. Disable the isKinematic on the enemy see if that helps.

If isKinematic is enabled, Forces, collisions or joints will not affect the rigidbody anymore. The rigidbody will be under full control of animation or script control by changing transform.position. Kinematic bodies also affect the motion of other rigidbodies through collisions or joints.

I think you need to do this instead

     void onCollisionEnter2D(Collision2D coll)
      {
           if(coll.gameObject.tag == "Enemy")
        {
             Debug.Log("Ow");
          }
     }