OnCollisionEnter(collision:Collision) Problem

OnCollisionEnter(collision:Collision) I have this code and it works fine but i need it to work on a specific part of an object for example a bottom part of a cube not the top or the side as it activates even when the player walks into the object but i would like it when he sort of hits it with his head when he jumps .

just use trigger,add an empty to ypur cube,then add a box collider on this and setting “is Kinematic” and “is Trigger” and their size.