How can I make my ray ignore transparent objects?

How can I make a ray ignore transparent objects?

local blacklistTable = {}
for i, v in ipairs(workspace:GetDescendants) do
    if not v:IsA("BasePart") then continue end
    if v.Transparency == 1 then
        table.insert(blacklistTable, v)
    end
end
workspace.DescendantAdded:Connect(function(descendant)
    if descendant:IsA("BasePart") then
        if descendant.Transparency = 1 then
            table.insert(blacklistTable, descendant)
        end
    end
end)


why isnt this working? It says it expects a string.

You should be using rayParams.FilterDescendantInstances

Can you give an example of how I would use that?

Just do this:

RayParams.FilterDescendantInstances = BlacklistTable


“FilterDescendantInstances” is not a valid member of RaycastParams

Oops typo, use
FilterDescendantInstances