Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

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

Asked by 9 years ago

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

Log in to vote
-1
Answered by 9 years ago
local Work = game.Workspace:GetChildren()

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

Hope this hepled

Ad

Answer this question