How do i check if something touches the terrain

I want to make so that the TERRAIN DETECTS if a part is touching it i have smooth terrain in my game.

I have a game where there is a plane that crashes into the terrain and instead of having multiple scripts in every part of the plane i want the terrain itself to detect the plane since the plane has 14000 parts.

The terrain is randomly generated using perlin noise so i cant put in parts there myself when in studio. So how do i detect if a part touches the terrain?

Evening.

There was a question like this that has been asked and answered before.

Review the following post:

I hope you found this useful in some way, shape, or form. The answer may be indirect, but you should be able to make something work!

Best,
-Create.

I have already read it it wont work since well, there is 14000 parts if every part is making multiple rays that would lag even more and i dont care what material it is. And if i were to place a single script in workspace that checks all parts and makes rays from them that would not either work there are to many parts so there would be big delays between checking parts

Then, simply place an invisible part over the terrain that is also walk-through-able, this way the plane is crashing into a part and it won’t look like it. Instead, it’ll look like it has crashed into the terrain. Then, all you need to do is add what you’d do for the 1400 parts, add a few crash mechanisms and you are set!

I hope that this helped.

Best,
-Create.

1 Like

it will maybe work for now it wont look so good since the terrain is randomly generated for each time the plane hits but it will be better than a huge amount of lag.