Basically what my question asked. Is there a way to have a ray ignore everything in the workspace except for specific bricks? Preferably a method that doesn't involve scanning the entire workspace to put all the bricks into a table and then remove those specific bricks. Thanks!
The simple answer is No.
Without sticking everything that is not a parent of the bricks into a table, there's no way. That said, you can stick all of the bricks into a single Folder or Model and use the ignoreDescendentsInstance
parameter of Workspace:FindPartOnRay()
Adding on to eLunate, it may be easier to simply check what you hit. Instead of ignoring all but a few bricks, just make sure what you hit are those bricks.
if hit.Name == "SpecialBrick" then