GetTouchingParts() is a function which returns all the parts that intersect with a part. However, if one part has CanCollide off (meaning you can walk through it), then it will not be returned in the table. Also if the part the function is being called on has CanCollide off, then it will return an empty table.
My suggestion is to add an optional argument to the function:
part:GetTouchingParts(
bool includeCanCollide = false
)
This means that it defaults to false
Now this function _probably_ uses the collision physics to handle this function, so I am not sure if this will even be possible.
I plan on using this to replace Region3s (which have a mean limit of 100 blocks)
Probably could increase efficiency of games depending on how Roblox implements it |