Physics.Raycast(ray, out hit, 1000, 9)

Am I correct to assume that this statement translates into cast a ray against all colliders except anything that is on layer 9?

Because the behavior Im getting is that it only cast against anything in the Default layer and ignores everything else.

No, the layermask is a bitmask, you’ve passed in an integer. a bitmask makes use of the fact that binary numbers are made up of 1’s and 0’s, each digit in a binary number being equivalent to one bit. The binary numbers essentially act as “switches” to enable or disable certain layers.

There are plenty of other answers here on UA that go into a LOT of detail on how they work, so I won’t bother with that. Although, to simplify things, have a look at the LayerMask class, it should simplify what you’re trying to do.