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

Is there a way to reset Terrain?

Asked by
ax_gold 360 Moderation Voter
6 years ago
Edited 6 years ago

I'm making a game involving crater-type explosions on terrain. But when the round resets, I want the terrain to reset to the way it was before the explosion. Is it possible to do this, and if so, how?

3 answers

Log in to vote
0
Answered by 6 years ago

workspace.Terrain:Clear()

1
His intentio is not to actually clear the terrain but to revert it to a certain point. iDarkGames 483 — 6y
Ad
Log in to vote
0
Answered by 6 years ago
for _,i in pairs(game.Workspace:GetChildren()) do
    if i:IsA("Part") then
        i:Destroy()
    end
end
Log in to vote
0
Answered by 6 years ago

You could use Clear() and FillBlock() or FillRegion() to reset and replace the terrain.

I’d give an example script but I have never used any of this, and it’s hard to make this on mobile. Just try experimenting and see if it works or not.

Answer this question