When I use RaycastParams it goes through a wall, but if I use FindPartOnRayWithIgnoreList it works just fine.
Heres the script:
local rayParams = RaycastParams.new()
rayParams.FilterType = Enum.RaycastFilterType.Blacklist
rayParams.FilterDescendantsInstances = Module.ignoreList
local ray = workspace:Raycast(root.Position,((getHumanoidPosition() - root.Position).unit * 500),rayParams)
Is there a way to fix this or do I have to rely on FindPartOnRayWithIgnoreList?
Any help would be appreciated!
JoolCaat
(JoolCaat)
November 16, 2021, 10:46am
#2
Are you certain that the wall isn’t in, or a descendant of anything in the ignore list?
I’m aware that you said it works with :FindPartOnRayWithIgnoreList but I’m not convinced that it’s a problem with :Raycast
WingItMan
(WingItMan)
November 16, 2021, 11:06am
#3
Add a break point to when you create the Params and look inside your ignore list or print it out to see what’s inside it just to verify.
Also remember, if your ray cast is starting from within the part, you won’t hit it.
I emptied the ignore list and it still went through the wall.
JoolCaat
(JoolCaat)
November 16, 2021, 11:24am
#5
Interesting
That was my only idea of what the issue could be
It might be helpful if you send a video of the issue
Deadwoodx
(uWood)
November 16, 2021, 11:27am
#6
Black list means the ray ignores the parts, keep whitelist to blacklist all parts but only hit the parts you mentioned
yes that is what im trying to use
The “target found” means it “directly” sees the player even though there is a wall.
koziahss
(Agent_Invalid)
November 16, 2021, 11:48am
#9
What have you incuded in the ignore list?
The ignore list is empty. I might need to just use FindPartOnRayWithIgnoreList.