Sword hit sound cutting off when clicking mouse fast

I have a combat system and if you hit the enemy it plays a hit sound. The issue is that if i cllick my mouse to fast the hit sound cuts off short and restarts the sound. How can i only play the hit sound once per animation?

newhitbox.OnHit:Connect(function(hit)
	local hum = hit.Parent:FindFirstChild("Humanoid") or hit.Parent.Parent:FindFirstChild("Humanoid")
	if hum then
		hitSound:Play()
		if not hum.Parent:FindFirstChild("Hittagged") then
			local tag = Instance.new("BoolValue")
			tag.Name = "Hittagged"
			tag.Parent = hum.Parent
			Debris:AddItem(tag,Cooldown)
			game.ReplicatedStorage.InflictDamage:FireServer(hum.Parent)
		end
	elseif hit:FindFirstAncestor("Resources") then
		game.ReplicatedStorage.BreakResource:FireServer(hit.Parent)
	end
end)

any help is appreciated!

Try this:

--//Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")

--//Functions
newhitbox.OnHit:Connect(function(hit)
	local humanoid = hit.Parent:FindFirstChildWhichIsA("Humanoid") or hit.Parent.Parent:FindFirstChildWhichIsA("Humanoid")
	
	if humanoid then
		hitSound:Play()
		hitSound.Ended:Wait()
		
		if not humanoid.Parent:FindFirstChild("Hittagged") then
			local tag = Instance.new("BoolValue")
			tag.Name = "Hittagged"
			tag.Parent = humanoid.Parent
			
			task.delay(Cooldown, function()
				tag:Destroy()
			end)
			
			ReplicatedStorage.InflictDamage:FireServer(humanoid.Parent)
		end
	elseif hit:FindFirstAncestor("Resources") then
		ReplicatedStorage.BreakResource:FireServer(hit.Parent)
	end
end)

Unfortunately this didnt work. It kind of made it worse.

You could add a debounce/coodown for using the sword