Hello, I’m making a destruction game and I want to know how to make the studs disappear after the explosion.
Script:
script.Parent.Touched:Connect(function()
local ex = Instance.new("Explosion")
ex.BlastRadius = 5
ex.Position = script.Parent.Position
ex.Parent = script.Parent
ex.DestroyJointRadiusPercent = 1
ex.BlastPressure = 50000
ex.TimeScale = 1
wait(1)
script.Parent:Destroy()
end)
I want for the script to detect blocks affected by the explosion and despawn them.