Script:
raycastParams.FilterDescendantsInstances = {
tool,
player.Character,
workspace:GetDescendants(hitpart.Name:match("Hole"))
}
Script:
raycastParams.FilterDescendantsInstances = {
tool,
player.Character,
workspace:GetDescendants(hitpart.Name:match("Hole"))
}
Perhaps this can help.
local filter = {} -- add tool and player
local raycast = RaycastParams.new() -- this is just example
raycast.FilterDescendantsInstances = filter -- replace with your 'raycastParams'
for _,v in ipairs(game.Workspace:GetDescendants(hitpart.Name:match("Hole")) do
table.insert(filter, v) -- ads one 'instance' at a time
end
raycast.FilterDescendantsInstances = filter -- updates filter
I forgot about table.insert.
I’ll implement that and see if it works.
EDIT:
Got it working.
Heres my updated portion of script if anyone here needs it:
local ignoreTable = {tool, player.Character}
for i, bulletHole in pairs(workspace:GetDescendants()) do
if bulletHole.Name:match("Hole") then
table.insert(ignoreTable, bulletHole)
end
end
local raycastParams = RaycastParams.new()
raycastParams.FilterType = Enum.RaycastFilterType.Blacklist
raycastParams.IgnoreWater = true
raycastParams.FilterDescendantsInstances = ignoreTable
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.