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

Is it possible to make a ray ignore everything except for certain objects?

Essentially what I want to do is be able to make a ray that will ignore everything in the workspace except for some specific parts.

Is there any way to do this other than getting all the parts in the workspace and adding them all to a table as the ignore list for the raycast methods?

Thanks

1 answer

local Work = game.Workspace:GetChildren()

for i=1,#Work do
if Work[i].Name == "NAME OF ISOLATED PART" then
end
end

Hope this hepled

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