Moving terrain (through script)

Hi, I’ve been looking around a bit but can’t seem to find a way of moving terrain using a script. Is this even possible? I’m trying to have a smoothterrain cave that I can move around (once) every round of my game. Any help appreciated!

1 Like

Roblox does not support any methods of “moving” terrain, however you could try using some of the methods here to generate smooth terrain voxels. I think your best method in this situation would either be to not use smooth terrain, or have multiple maps spread apart with the cave placed in different areas.

4 Likes

Thanks for your reply, but what I find weird is that in studio it is actually possible to manipulate a chunk of terrain using the move, rotate and resize tools: Environmental Terrain | Documentation - Roblox Creator Hub
So why isn’t there an option to do this with code?

1 Like

So, quick update on this: I decided to use a mesh for my cave instead of smooth terrain, though I would love to hear a solution to my original problem.

1 Like

This is an old post but I do have an example of this being done. (it is pretty buggy) https://www.roblox.com/games/6285019957/terrain-test
It doesn’t really move existing terrain but it has changing terrain.
I did it by using invisible parts to clear a section of terrain and fill terrain again over and over.

1 Like

You could theoretically load terrain saves that override eachother, creating sort of a ‘seamless’ effect.

However I advise against this. It’s not a built in or optimized way of doing it. But if you’d like to do it, there’s a plugin that generates TerrainRegions based on the current terrain, you’d have to make multiple terrain regions and then load them in order.

1 Like

can i just ask, how did you do that?

You are probably recreating the terrain every updateFrame to create the illusion of movement, right?
I guess that is a way to create movement but it is not really a fluid motion. What I was looking for in this post was a way to smoothly move/rotate/resize terrain without using these “hacks”. I might open an engine feature request asking if this could be implemented.

Edit: nevermind, I can’t post inside of #platform-feedback:engine-features. :unamused:

1 Like

apenzijncoolenleuk1 pretty much got it right. There are ways of reading existing terrain to modify it but it would be very difficult and laggy to make.

Also, one of the problems with my current method is you can pretty easily clip inside of the terrain.

1 Like

I have a model that moves 4x4 grass block terrain, this will clear all terrain except the 4x4 grass block.
Move the invisible part to move the terrain block.
terrain_mover.rbxm (3.1 KB)

1 Like