The blue parts represent the rays, and the noob model behind the one in front of it is having it’s ray “denied” despite me adding putting fellow noobs on a blacklist. Sorry if that doesn’t make sense.
if ThisCard.Team.Value == "Friendly" then
CardsToTarget = workspace.Cards.EnemyCards
task.spawn(function()
while Actions.Health.Value > 0 do
wait()
for i, c in pairs(workspace.Cards.EnemyCards:GetChildren()) do
if not table.find(InstancesToIgnore, c) then
table.insert(InstancesToIgnore, c)
end
end
end
end)
Raycasting Sequence:
local RayOrigin = ThisCard.HumanoidRootPart.Position
local RayDirection = ThisCard.HumanoidRootPart.CFrame.LookVector * 35
local RayCastResult = workspace:Raycast(RayOrigin, RayDirection, raycastParams)
For the blacklisting fellow noobs, I would put the FilterDescendantsInstances after inserting noobs into the table to update its blacklist, like this.
if ThisCard.Team.Value == "Friendly" then
CardsToTarget = workspace.Cards.EnemyCards
task.spawn(function()
while Actions.Health.Value > 0 do
wait()
for i, c in pairs(workspace.Cards.EnemyCards:GetChildren()) do
if not table.find(InstancesToIgnore, c) then
table.insert(InstancesToIgnore, c)
end
end
end
end)
raycastParams.FilterDescendantsInstances = InstancesToIgnore -- Update blacklist
Unfortunately the same result, but thank you for your help
I have a tiny feeling that it might have something to do with this though?
Seems like the filter type is deprecated or something, Though an error did not print; but i’m just pointing it out just in case.
I see roblox is changing a lot, they just removed Blacklist and stuff, and are left with Include and Exclude. Exclude being the new blacklist and Include being the new whitelist.
I think I should’ve moved the FilterDescendantsInstances before the table.insert, like this:
if ThisCard.Team.Value == "Friendly" then
CardsToTarget = workspace.Cards.EnemyCards
task.spawn(function()
while Actions.Health.Value > 0 do
wait()
for i, c in pairs(workspace.Cards.EnemyCards:GetChildren()) do
if not table.find(InstancesToIgnore, c) then
table.insert(InstancesToIgnore, c)
raycastParams.FilterDescendantsInstances = InstancesToIgnore -- Update blacklist
end
end
end
end)