Damage Hitbox Still Working After Attack

Im wanna create own weapon

issue about hitbox damage im use remoteevent to fireserver damage
but when my weapon slash damage still working

im find solution on youtube but no anyone can fix this (or i cant find)

this is my script
image

--FirstdamageScript
local remote = script.Parent.At
debounce = false

remote.OnServerEvent:Connect(function()
	script.Parent.Blade.Touched:Connect(function(plr)
		if plr.Parent:WaitForChild("Humanoid") and not debounce then
			debounce = true
			plr.Parent.Humanoid.Health = plr.Parent.Humanoid.Health - 5
			wait(1.5)
			debounce = false
		end
	end)
end)
--SecondDamageScript
local remote = script.Parent.Attack2222

debounce = false

remote.OnServerEvent:Connect(function()
	script.Parent.Blade.Touched:Connect(function(plr)
		if plr.Parent:WaitForChild("Humanoid") and not debounce then
			debounce = true
			plr.Parent.Humanoid.Health = plr.Parent.Humanoid.Health - 15
			wait(1.5)
			debounce = false
		end
	end)
end)
--AttackAnimScript
local plr = game:GetService("Players").LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
local Truch = hum:LoadAnimation(script:WaitForChild("Truch"))
local AAATack = hum:LoadAnimation(script:WaitForChild("AAAttack"))

if Truch and AAATack then
	print("Rhitta Loaded Animation!")
end

debounce = 0
attackswitch = 0

script.Parent.Activated:Connect(function(attackmouse)
	if attackswitch == 0 and debounce == 0 then
		debounce = 2
		attackswitch = 2
		Truch:Play()
		script.Parent.attack02:Play()
		script.Parent.At:FireServer(attackmouse)
		wait(0.35)
		debounce = 1
		attackswitch = 1
		end
			
	end)
	
script.Parent.Activated:Connect(function(attackmouse)
		if attackswitch == 1 and debounce == 1 then
			debounce = 2
			attackswitch = 2
			AAATack:Play()
			script.Parent.attack02:Play()
			script.Parent.Attack2222:FireServer(attackmouse)
			wait(1)
			debounce = 0
			attackswitch = 0
			end
end)
--EquipAnimScript
local plr = game:GetService("Players").LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local h = char:WaitForChild("Humanoid")
local anim = h:LoadAnimation(script:WaitForChild("Hold"))

local tool = script.Parent


tool.Equipped:Connect(function()
 anim:Play()
end)

tool.Unequipped:Connect(function()
 anim:Stop()
end)

And Animation and RemoteEvent and other
image

Problem

I WANT JUST ONE HIT!

lagtan1
lagtan2

1 Like

I think the issue is, you’re connecting the touched event when the remote event fires, but you never disconnect it. Instead of this, I would make a “Swinging” value and when it is true, do damage, otherwise, have it do nothing.

bruh i can fixed my solution by use disable Damage script :pinching_hand: