How could I replicate terrain from the server to client?

As simple as the title is. How could I do that?
I’ve tried using Terrain:CopyRegion() and Terrain:PasteRegion() but I could never figure it out. It would be nice if someone could explain this to me in depth.

1 Like

Maybe you could store the terrain in replicated storage somehow and use a remote event to individually copy it on to each client?

1 Like

Yes, how could I store and replicate it exactly? That’s what I’m asking in the post.

Bump help pls
Charlimitlimitlimitlimit

bumbumpbumpbumpbumpbumpbumbumpbumpbump bump bump

Terrain:CopyRegion() and Terrain:PasteRegion() both don’t replicate according to the docs. There’s also only one Terrain instance for an entire place, so you have to work with all of the terrain or none of the terrain, which sucks.

Instead of replicating Roblox’s Terrain, I think you should instead export the Terrain to 3D modeling software such as Blender and make individual meshes from parts of the map.

Otherwise the best you can do is “loading” the Terrain for the entire place by setting Transparency between 0 and 1 and Collision true or false.

The Terrain system in Roblox is really not that great because of these limitations, I personally have exported and created meshes from Roblox Terrain inside Blender as I have suggested for you.

I suppose you could also try doing client-side region copy and pasting, having the terrain far off from the player and copy pasting chunks from there to where you need it to be as they play the game.

Oh shucks. My client manipulates the terrain and as the terrain gets more deformed I need it to regenerate it somehow. I’ve never worked with meshes, rather my PC doesn’t even support Blender so I rarely work with Blockbench.

So you’d suggest I need a clone of the map away from the actual map and use CopyRegion on that instead of just simply asking the server for it? That’s pretty smart but it would hurt performance for high-graphics clients since they could render that terrain aswell. Would there be a possible way of preventing the cloned terrain from rendering?

I was thinking of making a remote function which first gets fired by the client. The server listens and once detects it will fire the remote function with a argument which is :CopyRegion(Terrain.MaxExtents) but I kept getting Extents cannot be empty and Region is too large errors. I’ve tried getting the Region3 of my terrain manually but it still kept erroring. I’ve gave up trying to debug this but what I had in mind was that the server would fire the remote function back to the client, with this copied region and the client would use :PasteRegion(). In short a Client > Server > Client communication.