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

Is it possible to check if something is inside a region3?

Asked by 3 years ago

I am looking for the best way to check if my model is inside a specific area. I found out about region3s. I was wondering if it is possible to check if something is inside a region3 and if so how would I do that?

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago
local parts = workspace:FindPartsInRegion3(region3Name, ignoreList, maxNumberOfPartsToIndex)

if table.find(parts, Part) then
    print("Part found")
end

Remember to check the documentation first.

https://developer.roblox.com/en-us/api-reference/datatype/Region3

Specifically in that page it links to here:

https://developer.roblox.com/en-us/api-reference/function/WorldRoot/FindPartsInRegion3

Ad

Answer this question