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

Script crashing game help?

Asked by 8 years ago

This script is a regular script and will delete it self after exploding, but it crashes after it hits. I can't identify the problem.

script.Parent.Touched:connect(function()
    local ex = Instance.new("Explosion")
    ex.BlastRadius = 5
    ex.BlastPressure = 0
    ex.Position = script.Parent.Position
    ex.Parent = script.Parent
    ex.Hit:connect(function(hit)
        if hit.Parent:FindFirstChild("Humanoid") then
            hit.Parent.Humanoid:TakeDamage(20,30)
        end
    script.Parent:Destroy()
    end)
end)
0
Please post the output of the script User#2263 0 — 8y
0
I can't because I crash after it happends. Anthony9960 210 — 8y

Answer this question