Spherecast LayerMask not working?

I am trying to get a Spherecast to let me know if it hits an object on X Layermask but for some reason it doesn’t seem to yield any result.

As far as I can tell my syntax is correct so I am really struggling as to why it wont work:

            RaycastHit hit;

            if (Physics.SphereCast(offSetPosition, sphereRadius, aiController.transform.forward, out hit, rayDistance, layerMask.value))
            {
                Debug.Log(hit.transform.name);
            }

The offset position is just the aiController’s(the object shooting the sphere) position with the y position modified to be out of the ground.

Any assistance would be helpful!

Usually when debugging this sort of thing, I like to add Debug.DrawRay or Debug.DrawLine to convince myself that the ray is travelling through the object I think it should.

What is the actual value of layerMask? The docs are confusing about this, but you should be passing in a mask that includes the layers you want to hit. (The docs make it seem like you should pass in the layers you wish to ignore.)