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

Check if parts are intersecting?

Asked by 8 years ago

How can I check if 2 parts are intersecting or not? I tried doing it with Region3 and FindPartsInRegion3 but that didnt work every time.

0
Compare the parts' position and size Perci1 4988 — 8y
0
and how do i do that? CodeSponge 125 — 8y

1 answer

Log in to vote
2
Answered by
1waffle1 2908 Trusted Badge of Merit Moderation Voter Community Moderator
8 years ago

Part:GetTouchingParts() returns a table of all CanCollide true parts that intersect with this part. If the part itself is CanCollide false, then this function will return an empty table. Parts that are adjacent but not intersecting are not considered touching.

0
wow didn't know that existed. Perci1 4988 — 8y
Ad

Answer this question