PasteRegion errors out with "region has to be a TerrainRegion"

Tried to pass a copied TerrainRegion from client to server and it errored out with this:
image

I’m fairly positivive i gave a terrain region. Can you even replicate a TerrainRegion from the client to the server this way?

TerrainReplication.rbxl (29.6 KB)

Print out the terrain region that you receive. It’s probably nil.

if a client creates a part and tries to pass it to the server, the server will see a nil value because the part isn’t replicated to the server.

Huh… good point!
But then how can i pass some terrain trough if the client makes it?

Edit: It was nil.

You could pass the raw voxel data you receive from Terrain | Roblox Creator Documentation

Or, if the client and server both know about the Terrain (which I’m pretty sure they do), you could just pass the bounding coordinates that the client chooses to the server, and then have the server actually do the copy/pasting.

The second one is almost definitely the best option.

2 Likes

Oh yeah… that… exists. :sweat_smile:
Marked as solution and thank you.