Raycast bug or what?

Actually this topic does not belong here but i dont have permission to write it to more related categories. Thanks to roblox’s rank system!

I tryed to use workspace:Raycast method to detect some parts on the ground but i couldnt achieve it and couldnt figure it out for 6 hours(!). And voila the problem was i used another collision group for part which has not collision with Default. So when i marked collision with Default the problem has gone. I read documentation 2 times but i never saw something like that. I think this is not intended behaviour but i need explanation.

Nope not a bug, by default a raycast will have a collision group as default because it’s in the name default. Also it is in the documentation under RaycastParams | Roblox Creator Documentation for collision group.

Specifies a collision group for the raycasting operation. Parts in collision groups that are set to not collide with this group will be ignored. If this property is omitted, the raycast will assume the Default collision group.

2 Likes