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

How to make all explosions NoCraters?

Asked by 6 years ago

explosion.ExplosionType = Enum.ExplosionType.NoCraters

I need to have a script that will disable the destruction of terrain.

1 answer

Log in to vote
2
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
6 years ago

You could use a DescendantAdded event on workspace to detect when a new explosion is being created.

Then, repeat your code above.

workspace.DescendantAdded:Connect(function(explosion) --DescendantAdded event
    if explosion:IsA("Explosion") then --Check if it's an explosion
        explosion.ExplosionType = Enum.ExplosionType.NoCraters --Change it
    end
end)
0
THANK YOU! buildbanner 2 — 6y
Ad

Answer this question