How Do I Reset Terrain?

I’m working on a round-based game, but I cannot figure out how to reset the map after use. My plan is to allow players to destroy the terrain with explosions, and after a period of time the terrain will reset to its original state.

I know how to use cratered explosions, I would just like to know a way that I can reset the terrain after a while.

Help would be appreciated! :grin:

2 Likes

To clear terrain use Workspace.Terrain:Clear()

1 Like

Thanks, but I was looking for a way to reset the terrain. If you have any information about that, please let me know!

What dose reset mean in this instance?

Your example of a function would be very helpful, but I would also like to know a way to bring the terrain back to its original state.

So for this instance you’re talking about creating/moving terrain?

He wants to have a Terrain battlefield area that players can bomb and crater, and have it restore after each round.

Try doing this

I understand how to do this with parts, but I would like to know how to do it with terrain.

If your terrain is not really complex, you can use Terrain:FillBlock() or Terrain:FillRegion()
Or maybe if you can’t find a better solution you can try teleporting players into a lobby/intermission place and shutting down the server on wich you want to reset the terrain then teleporting the players back

Use copyRegion and store that in a dictionary/variable:

local terrainRegion = workspace.Terrain:CopyRegion(workspace.Terrain.MaxExtents)
RoundEnded:Connect(function()
    workspace.Terrain:Clear()
    workspace.Terrain:PasteRegion(terrainRegion, workspace.Terrain.MaxExtents.Min, true)
end)

documentation: Terrain | Documentation - Roblox Creator Hub

2 Likes

Sorry, this is a bit late but, this might be useful!