raycast without stoping on a collider

Hi I am wondering how to raycast without it stopping on all collides but the collider I want it to hit?

If you are looking for a particular collider you should use Collider.Raycast which only looks for that particular collider. You can use Physics.RaycastAll to get a list of all of the colliders intersected by a ray.

Use layers to do this:

You could put all the other colliders into the default layer “Ignore Raycast”