Raycast, ignore multiple layers?

I want to ignore 2 layers with a raycast but i dont know how to do that.

if (Physics.Raycast(new Vector3(randomX, 100, randomZ), Vector3.up * -1, out hit, 150, multiple layers??))
        {
            //do things
        }

I want to ignore those layers: 202308-imagen-2022-11-27-171106440.png

Sorry for my english

There’s a very neat way of doing this. At the top of your class, create a serialized field of type LayerMask:

[SerializeField] LayerMask layerMask;    

That will appear in the Inspector and you can select multiple layers there. In your Raycast, simply pass in the variable layerMask.