Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why i can't change the "explosion" value?

Hi, my script don't work, it said

DestroyJointPercent is not a valid member of Part

My script is

script.Parent.ChildRemoved:connect(function(hit)
	a = Instance.new("Explosion")
	a.DestroyJointRadiusPercent = script.Parent.DestroyJointPercent.Value
	a.BlastPressure = script.Parent.BlastPressure.Value
	a.BlastRadius = script.Parent.BlastRadius.Value
	a.Position = script.Parent.Position
	a.Parent = workspace
	script.Parent.Parent:Destroy()
end)

Can someone help?

1 answer

✓ Accepted answer
script.Parent.ChildRemoved:connect(function(hit)
    a = Instance.new("Explosion")
    a.DestroyJointRadiusPercent = script.Parent.DestroyJointRadiusPercent
    a.BlastPressure = script.Parent.BlastPressure
    a.BlastRadius = script.Parent.BlastRadius
    a.Position = script.Parent.Position
    a.Parent = workspace
    script.Parent.Parent:Destroy()
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.