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

Does :FindPartsInRegion3 works with models?

my question is in title

2 answers

✓ Accepted answer

So as the function's name says "FindPartsInRegion3", it finds "Parts" in the region, so it only collects data from the parts that are found in the region. Whether or not those parts are inside of a model or not is up to you to find out.

Lucky for you, there is an easy way to find out if one of those parts is a child of said model. You would use an ancestor function, the idea behind them is that it will basically loop up through the parents/grandparents until it reaches the model you want and return the ancestor if found, or it won't if it isn't found, meaning the part is not in the model. You can select the right variation for you at the following link: https://developer.roblox.com/en-us/api-reference/function/Instance/FindFirstAncestor

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