How do i make explosions deal damage instead of the damage being done from breaking joints?

im making a trench warfare game and im making an artillery cannon, i’ve already made it not break joints but it doesnt do damage.

this is the script

`ball = script.Parent

damage = 50

function tagHumanoid(humanoid)

local tag = ball:findFirstChild("creator")

if tag ~= nil then

	local new_tag = tag:clone()

	new_tag.Parent = humanoid

end

end

function onTouched(hit)

if math.random(1,2) == 1 then
	local explosion = Instance.new("Explosion")
	
	explosion.DestroyJointRadiusPercent = 0
	
	explosion.BlastRadius = 12

	explosion.BlastPressure = 500000 
		
	explosion.Hit:Connect(function(hit)
		if hit.Parent:FindFirstChild("Humanoid") then
			ta`Preformatted text`gHumanoid(hit.Parent.Humanoid)
		end	
	end)

	explosion.Position = script.Parent.Position

	explosion.Parent = game.Workspace
		
	connection:disconnect()

	ball:Destroy()
end	

end`

Nevermind I’m stupid, I’ve seen you’ve already did Explosion.Hit and making the explosion not break joints, but you should move this to Scripting Support.

humanoid:takedamage(number)

atleast30characters