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

Region3 detected too many parts and didn't notice the part I want, how to ignore?

Maybe you use FindPartsInRegion3WithIgnoreList but I don't know how to use it :/

3 comments

0

Have you tried FindPartsInRegion3WithWhiteList? It uses a list of things you want found.

0

Is the white list supposed to be a table of object values?

0

yes, it is required to be an array of instances

1 answer

The best solution is to read the wiki.

http://wiki.roblox.com/index.php?title=API:Class/Workspace/FindPartOnRayWithIgnoreList

Parameters :

ray Type: Ray Required ignoreDescendantsTable Type: array Required terrainCellsAreCubes Type: bool Defaults to: false ignoreWater Type: bool Defaults to: false

'IgnoreDescendantsTable' requires an array(table) of instances, which the function will use to ignore the parts found on the ray.

--Example:

local ray = Ray.new(
	-Vector3.new(1,1,1),
	Vector3.new(1,1,1)

)

local ignoreList = {workspace.Baseplate}

local foundparts = workspace:FindPartOnRayWithIgnoreList(ray,ignorelist,false,false)

for _,v in pairs(foundparts) do
	print(v.Name,v.Parent)
end

2 comments

0

But I want Region3 not Ray

0

oh, sorry. That's when you don't read the whole thread.

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