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

Explosions like in Destruction Simulator?

Asked by 4 years ago
Edited 4 years ago

Hi, I was just wondering how I could make explosions like in Destruction Simulator. Basically an explosion that would make blocks fly out but not hurt the player. This is what I have:

game.ReplicatedStorage.Stomp.OnServerEvent:Connect(function()
local strength = game.Players[script.Parent.Name]:WaitForChild("leaderstats").Strength.Value
    local explosion = Instance.new("Explosion")
    explosion.DestroyJointRadiusPercent = 0
    explosion.BlastRadius = strength/10
    explosion.BlastPressure = 75000
    explosion.Visible = false
    explosion.Position = script.Parent.RightFoot.Position
    explosion.Parent = game.Workspace
end)

0
please use code block. I can't tell what's going on blazar04 281 — 4y
0
also what in this script doesn't work? blazar04 281 — 4y
0
Basically the parts are not flying away and also it makes the player get stuck in the ground TheReverseGaming 29 — 4y
0
I don’t know exactly where it isn’t working but I think the blast pressure is too low TheReverseGaming 29 — 4y
View all comments (5 more)
0
The reason why parts aren't flying anywhere is because you set explosion.DestroyJointRadiusPercent to 0. Also, the explosion does not make Anchored parts fly. You could keep DestroyJointRadiusPercent at 0 and script your own behavior using the explosion.Hit event. blazar04 281 — 4y
0
Wouldn’t it kill the player if I change DestroyJointRadiusPercent? Also how would I make the parts fly away with the explosion.hit event? TheReverseGaming 29 — 4y
0
Could I use Vector Force? TheReverseGaming 29 — 4y
0
Yeah that's why I was saying to keep it at 0 and script your own behavior. Vector Force could work. You could really get as creative as you want with this blazar04 281 — 4y
0
Ok I will try tomorrow, thanks for the help, I will get back to you if I have any problems TheReverseGaming 29 — 4y

Answer this question