turning CONVEX 'on' via script

enter code here OnMouseDown(){

        transform.parent = null;
        rigidbody.isKinematic = false; 
        transform.InverseTransformPoint(transform.position);
    
    // all above is working just as planned
    
    //here need it so Convex is turned on the MeshCollider
    //but there is an error with this \/
        transform.collider.convex = true;
    
    }

I get the error: ‘convex’ is not a member of ‘UnityEngine.Collider’
why can’t I access the convex toggle this way?
-thank you

The class Collider does not have a ‘convex’ property, MeshCollider does.
The following code does what you want:

transform.GetComponent<MeshCollider>().convex = true;

PS: You’re using InverseTransformPoint incorrectly. It returns a Vector3, which you are not using, so the function call will essentially do nothing.