OnCollisionEnter not called

I created a ball, or say a sphere object,
add rigidbody component, no kinematic;
and attached a script to it like this

function Update () {
}

function OnCollisionEnter(collision : Collision) {
	Debug.Log("OnCollisionEnter");
}

then I created a cube under the ball,
added box collider component, no trigger of course;

then i run the game, the ball falls down onto the cube,
and nothing happens, the OnCollisionEnter function hasn’t been called?

what should I do?

Attach the script to the cube, or the object that receives the collision. Make sure you change the script to work for your needs - for example:

function Update () {
    //Update Method Here
}
 
function OnCollisionEnter(colliderName : Collision) {

    if(colliderName.gameObject.tag == "Sphere"); {
        Debug.logWarning("THE SPHERE HAS COLLIDED WITH THE CUBE");
    }

}

Hope that helps - If you need further assistance, just ask!
Happy to help!

Edit: You MUST DEFINITELY Tag the sphere as “Sphere” from the editor. Make sure it is tagged as “Sphere” (without the quote and quote) in order for this script to function correctly…