-- evento para atacar

eventAttack.OnServerEvent:Connect(function(player, isAttackingLeft, isAttackingRight, rightSword)
	local character = player.Character
	local leftSword = character.LeftHand.Sword
	-- aqui hacemos el daño cuando el usuario acciona su espada 
	leftSword.Touched:Connect(function(hit)
		local humanoid = hit.Parent:FindFirstChild("Humanoid")
		if isAttackingLeft and humanoid then
			humanoid:TakeDamage(DAMAGE)
			isAttackingLeft = false
		end
	end)
	
	rightSword.Touched:Connect(function(hit)
		local humanoid = hit.Parent:FindFirstChild("Humanoid")
		
		if isAttackingRight and humanoid then
			humanoid:TakeDamage(DAMAGE)
			isAttackingRight = false
		end
	end)
	
end)
