Raycast doesn't detect dummy hands and legs

please help my raycast script doesnt detect dummy hands or legs
(fps game)

the dummy is R6
for some reason it only detects the head and torso

you might be thinking oh maybe cuz the arms and legs have can collide off but I tried with on and off and It doesnt work

script for raycast:

local params = RaycastParams.new()
params.RespectCanCollide = true
params.IgnoreWater = true
params.FilterDescendantsInstances = {Viewmodel,char}
	
local bullet = workspace:Raycast(cam.CFrame.Position,cam.CFrame.LookVector * 1000,params)
	
if bullet then
	print(bullet.Instance)
end
	

no errors in script, it just doesn’t detect Arms and Legs and ONLY arms and legs

params.RespectCanCollide = true

the limbs do not have cancollide so it ignores them set this to false

I already have this enabled. can you read the script please?

Try setting respect can collide false.

How exactly did you do these? A humanoid will force it to be off every frame so you might need to force it every .Stepped or presimulation depending when the raycast was fired.

1 Like

welp that seemed to work i dont really know why

As @YouthfulPat501 said

cancollide = false, respect can collide = true, raycast = false

cancollide = false, respect can collide = false, raycast = true

my bad i accidently wrote true but you shouldve looked into it

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.