Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

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

Asked by 4 years ago

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.

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

1 answer

Log in to vote
0
Answered by
o_fex 146
4 years ago

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.

Ad

Answer this question