Caching terrain help

What do you want to achieve?
I want to be able to save and load terrain for a game I’m construction.

What is the issue?
The issue is that terrain, especially when I have many maps for my game, can cause lag. If I could only have one loaded at a time, it would reduce a lot of lag.

What solutions have you tried so far?
I have looked for solutions, the farthest I got was Terrain:ReadVoxels() but I couldn’t seem to get it to work properly? If anything I don’t think it can save complex terrain.

Below is a photo of just one of my maps. The terrain here is quite small but having many of them just sitting in Workspace is causing lag for my servers.

I’m simply looking for a way to save a terrain in a table form. So if a specific map is voted on, it can load the terrain needed.

I believe this is what you’re looking for. The Terrain:CopyRegion function stores the terrain data so it can be loaded and unloaded in a game.


This does work however it gets all the terrain. Do you know how I could only get a certain part?

The parameter for Terrain:CopyRegion is a Region3int16. So you can change that to the region you want.

1 Like

Thank you so much for the help, but do you know of a way for me to convert a part to a Region3int16 variable?

This post should help.

1 Like

I’ve skimmed through it and I think I know how this will work out for me and my game, thank you so much!

1 Like