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

Is there a way to detect if a part is touching another part while it's CFramed inside of it?

Asked by
traigla 75
9 years ago

I've looked up the 'Touched' event and it will not fire while a part is CFramed inside another part. Is there a way to detect if a part is touching another part while it's CFramed inside of it? Any help will be appreciated!

1
You can, but it's difficult to get an accurate result. aquathorn321 858 — 9y
0
mind boggled, great question bro! dragonkeeper467 453 — 9y

1 answer

Log in to vote
1
Answered by 9 years ago

If you're trying to detect a collision it won't work. The parts are perfectly inside each other so they'll never be able to move, nullifying any collision-based code. The only solution I see is to use Magnitude, basically saying that if they're a certain distance from each other then it can be detected. Other than that I don't see any other way of finding out when they touch. Even then, it kind of assumes that their centers are very close to each other, which they may not be.

Ad

Answer this question