Detect 3D collision side

Hi, I need to know which side my capsule collider hit an object (which can be front, back, left, right, top and bottom).

You guys know any script I can use for it?

Thank you!

Your best bet here is ContactPoint.
You can have normal of the contact and point of the contact.
I believe, having normal of the contact is better, since it gives a nice Vector3 and with vector transformations, you can have any desired information.

Use Transform.InverseTransformPoint on the ContactPoint.point to convert it to local space and then you can use basic logic to determine what region it hit.

void OnCollisionEnter(Collision collision) {
    Vector3 localContactPoint = transform.InverseTransformPoint(Pointcollision.contacts[0].point);

    if(localContactPoint.y > topLimit) hitTop();
    if(localContactPoint.y < bottomLimit) hitBottom();
    if(localContactPoint.z > frontLimit) hitFront();
    if(localContactPoint.z < backLimit) hitBack();
}

This is just a very general example, but I hope it illustrates what I’m trying to say.