Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I have some savedregions of terrain, how do I load them in via a script?

Credit to NinjaboySC for the terrain save load plugin.

So, I have two savedregions of terrain that I want to load in via a script. What would the function be to load in the terrain and how would I reference it?

Would I reference the savedregion like this?

local map1 = game.Workspace.Terrain.SavedRegion

Would :Load be the correct function?

Please help.

1 comment

0

Wait, would Terrain:CopyRegion work if i say Copy an area inside the terrain? Like local map1 = workspace.Terrain:CopyRegion(workspace.Terrain.Map1)?

1 answer

Hey there.

The best way to go is by putting **map1 ** inside ReplicatedStorage. From there you can go into a Script inside ServerScriptService and use:

game.Players.PlayerAdded:Connect(function()
	local map1 = game.ReplicatedStorage.Terrain.SavedRegion
	map1.Parent = workspace
end)

to load it in.

This discussion is preserved as it was. New answers, comments, and votes are closed.