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)
You should be using rayParams.FilterDescendantInstances
Can you give an example of how I would use that?
Just do this:
RayParams.FilterDescendantInstances = BlacklistTable
Oops typo, use
FilterDescendantInstances