Greetings,
I’ve recently begun to experiment with raycasting. Is there a way to implement a table to a raycast ignorelist?
IgnoreParts = {}
Params.FilterDescendantsInstances = {IgnoreParts}
Magma ball that is being detected:
local ClonedBall = MagmaBall:Clone()
ClonedBall.PrimaryPart.CFrame = ClonedBlast.PrimaryPart.CFrame * CFrame.new(randCFX,randCFY,randCFZ)
ClonedBall.Parent = DebrisFolder
ClonedBall.Name = "Magma "..i
table.insert(IgnoreParts,ClonedBall:GetChildren())
Even after printing: print(Params.FilterDescendantsInstances)
it shows that magmaball is indeed inside of it.
Again, this is probably an easy fix - any help is appreciated. Water_KKnight
1 Like
kndn_v
(kanden)
May 14, 2021, 5:22am
2
Is this part run only once? Or is it in a loop somewhere else?
1 Like
it is running in a for-loop (raycast below part). Either way it doesn’t seem to be adding ‘v’ into the raycast ignorelist, but it’s adding it into the table.
RoBoPoJu
(RoBoPoJu)
May 14, 2021, 8:14am
4
Why do you put the IgnoreParts table inside another table instead of just doing this?
Params.FilterDescendantsInstances = IgnoreParts
For Debris you can just work with collision groups for raycast Params and it’ll update automatically without any more table manipulation.
because it has a few other parameters that are not shown In the script above
coroutine.wrap returns a function, so you actually have to call it. coroutine.wrap(function() -- Code end)()
1 Like
Iplaydev
(Marty)
May 15, 2021, 12:46am
8
Okay - then do
Params.FilterDescendantsInstances = { unpack(IgnoreParts), otherInstance1, otherInstance2 }
This should add all elements of IgnoreParts to FilterDescendantsInstances, as well as the other instances
1 Like