How to detect collision (crashing)

i want to make a plane system in my game, it can fly, if it crashes into something, it will explode
(ill fix the plane position later)

but i dont know how to detect when it crash (TOUCHED EVENT WONT WORK COME ON)

i tried humanoid state, detecting velocity, they didnt work

as you can see, it crashes but it didnt explode

2 Likes

A simple Touched event fired if the plane touches any other Part should work for you.

3 Likes

touched event only works for unanchored part

1 Like

actually i found a solution, use GetTouchingParts()

What do you mean? The first line of the link I posted:
" The Touched event fires when a part comes in contact with another part. For instance, if PartA bumps into PartB, then PartA.Touched fires with PartB, and PartB.Touched fires with PartA."

Are you CFraming the plane? That may have been why it wasn’t firing.

im using body movers, soooo… to use touched event i have to put every script with it into every part?

This event only fires as a result of physical movement, so it will not fire if the CFrame property was changed such that the part overlaps another part. This also means that at least one of the parts involved must not be Anchored at the time of the collision.

I’d use a very simple union or meshpart the size of the hitbox of the car. If you make it transparent and cancollide true with a single script for the Touched event it shoild work fine. This means you can make the rest of the car Parts CanTouch false and CanCollide false. That allows for less stress on the system because it doesn’t need to calculate Touched events for those extra Parts.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.