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
7 years ago
Edited 7 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 7 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 — 7y
Ad
Log in to vote
0
Answered by 7 years ago
1for _,i in pairs(game.Workspace:GetChildren()) do
2    if i:IsA("Part") then
3        i:Destroy()
4    end
5end
Log in to vote
0
Answered by 7 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