for some reason, this script connects, destroys itself at the end, but doesn't actually insert the Explosion like it should. It works fine when r is false by the way.
-- cre is an object value
-- r is a Boolean value
function onHit(hit)
if hit.Parent:FindFirstChild("Humanoid") and r.Value == false and hit.Parent.Name ~= cre.Value.Name then
hit.Parent.Humanoid:TakeDamage(10)
elseif r.Value == true and hit.Parent.Name ~= cre.Value.Name then
local bo = Instance.new("Explosion")
bo.BlastPressure = 10000
bo.BlastRadius = 20
bo.Parent = script.Parent
end
wait()
script.Parent:Destroy()
end

2 comments
Oh, is Position necessary for Explosions? I figured that was implied as it is with Fire, lights, etc.
Yes it is needed.