Terrain Destruction

Hello.

So my game relies on terrain for mostly everything. we try to keep buildings to a minimum which really helps our outdoors naturey effect.

Now, I know that explosions destroy terrain in its radius (destroyjointradius). is there a way to do something similar but without explosions? to in a sense… mine terrain.

2 Likes

You can make use of the Terrain API to modify terrain from Lua. Here’s a tutorial. To remove terrain, use the material Enum.Material.Air.

Hi, what I used in Dog Simulator is Terrain:SetCell which takes an X,Y,ZMATERIAL,BLOCK,ORIENTATION. accordingly to the playermouse position.

You can set the explosion type to not destroy Terrain.

edit: sorry, reread your original post. How about using an explosion, but not having the visual explosion show up?

Terrain:SetCell is deprecated so you shouldn’t be using it because it was made for the legacy terrain system.

I understand that, but it’s working.

Don’t do this.

If it’s deprecated, do not rely on it. If it works, yeah, but if it breaks, it won’t be fixed. You should use the dedicated Region tools (FillBall, FillBlock, etc.) as these are up to date and will be fixed if they break.

1 Like