function onTouched(hit) if hit.Name == "Key" or hit.Name == "Torso" then local e = Instance.new("Explosion") e.Parent = game.Workspace e.Position = script.Parent.Position e.BlastRadius = 3 e.BlastPressure = 0 e.BlastDamage = 10 end end script.Parent.Touched:connect(onTouched)
i thought the blastdamage would work i dont want the destroy joints thing because i dont want insta kill
Using the Explosion.Hit event, you can damage a player if they are hit by the explosion:
explosion.Hit:Connect(function(part,distance) local damage = 100 / distance -- replace with desired value local partParent = part.Parent local humanoid = partParent:FindFirstChild("Humanoid") if humanoid then humanoid:TakeDamage(damage) end end)