It doesn’t, it only detects if it has CanCollide on (or doesn’t work if it has CanCollide off)
1 Like
Set up CollisionGroup for the part. Generally, it will work that way.
1 Like
For some reason the ray collides with the head too which I don’t want to happen as my game is first person, any ways I could make it not collide with the player head. (sometimes it happens sometimes it doesnt each time I start a simulation it works in a weird way)
1 Like
local n = RaycastParams.new()
n.RespectCanCollide = false
n.FilterType = Enum.RaycastFilterType.Blacklist
n.FilterDescendantsInstances = {head}
local result = game.Workspace:Raycast(origin, direction, n)
You could try adding offset or something else.
do i make head a variable or it will just work
1 Like
Yes. Generally, just try improving the system by yourself since you have the basic of raycasting now.
1 Like
Thank you this is all I needed and I will also try learning from that from now on
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.