I want to load terrain from code. I want to do this because a want to have multiple maps and not be limited by parts.
I don’t know how I can achieve this.
I have tried to copy over the terrain part in the workspace and make multiple for each map. It seems like this would be the answer but Roblox won’t let you do that.
Check out Crazyman32’s Load & Save Terrain Plugin. I’ve that successfully in the past.
Create your Terrain, then export it using the Plugin and place into Server Storage. You can then load and unload using the following:
workspace.Terrain:Clear() -- Clears the existing Terrain
workspace.Terrain:PasteRegion(terrainSource, workspace.Terrain.MaxExtents.Min, true) -- Loads the Terrain in from the location specified in the ```terrainSource``` variable.