After swinging this sword I made to test more accurate hitboxes I ran into a problem where after a while of swinging the sword it would stop working
if touch.Parent ~= IgnoreTable.Ignore1 and touch.Parent ~= IgnoreTable.Ignore2 and touch.Parent ~= IgnoreTable.Ignore3 then
if touch.Parent ~= Human.Parent and touch.Parent ~= script.Parent and touch.Parent:FindFirstChild("Humanoid") then
local tc = trail:Clone()
local bloodC = script.Parent.Handle.Blood:Clone()
bloodC.Parent = tc
tc.Parent = workspace
local hsC = script.Parent.Handle.HitSound:Clone()
hsC.Parent = tc
hsC:Play()
tc.Name = "BloodSplurt"
bloodC.Enabled = true
tc.Transparency = 1
delay(.3, function()
bloodC.Enabled = false
wait(1.7)
tc:Destroy()
end)
if IgnoreTable.Ignore1 == nil then
IgnoreTable.Ignore1 = touch.Parent
elseif IgnoreTable.Ignore2 == nil then
if touch.Parent ~= IgnoreTable.Ignore1 then
IgnoreTable.Ignore2 = touch.Parent
end
elseif IgnoreTable.Ignore3 == nil then
if touch.Parent ~= IgnoreTable.Ignore1 then
if touch.Parent ~= IgnoreTable.Ignore2 then
IgnoreTable.Ignore3 = touch.Parent
end
end
end
if touch.Parent.Humanoid.Health <= 40 then
makeFinisher(touch.Parent)
else
end
touch.Parent.Humanoid:TakeDamage(40)
end
end
-- at the begining of every swing it resets the ignore table
function InitiateAttack()
if not SwingCooldown and Eq then
IgnoreTable = {
Ignore1 = nil,
Ignore2 = nil,
Ignore3 = nil
}