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

Does :FindPartsInRegion3 works with models?

Asked by 3 years ago

my question is in title

2 answers

Log in to vote
1
Answered by
SteamG00B 1633 Moderation Voter
3 years ago
Edited 3 years ago

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

Ad
Log in to vote
1
Answered by 3 years ago

Here is an article in Dev Forum you can view. https://devforum.roblox.com/t/how-does-findpartinregion3-work/67782

0
This belongs in a comment, it is not an answer. Answers explain things, comments are there to add short bits of info like links. SteamG00B 1633 — 3y

Answer this question