Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is there a way to ignore multiple things with raycasting?

I'd like to know if there is any way to ignore multiple things on raycasting ( Such as EVERY PLAYER )

1 comment

0

I apologize for requesting, its just there isn't a lot on raycasting in the wiki.

1 answer

✓ Accepted answer

LASERS AND RAYS AND LASERS AND RAYS

This question is fairly easy, I'm guessing you are using :FindPartOnRay(), but for this situation, We'll have to use FindPartOnRayWithIgnoreList.

FindPartOnRay has a "ignore" parameter, but it only has power to provide 1. FindPartOnRayWithIgnoreList accepts a table, with all the ignored objects.

something.Event:connect(function(...)
	local ignore = {everything ignored here}
	game.Workspace:FindPartOnRayWithIgnoreList(ray, ignore)
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.