Problem With ClientCast

I want to make a sword combat system but I came across a problem with ClientCast.
The system works just fine but the sword damages every time I equip the katana. I guess that it is due to ClientCaster not being stopped. But I don’t know why it isn’t being stopped.

CODE
Local Script:

local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local UserInputService = game:GetService("UserInputService")
local Debris = game:GetService("Debris")

local Folders = {
	Main = ReplicatedStorage.CombatSystem;
	Remotes = ReplicatedStorage.CombatSystem.Remotes;
	Libs = ReplicatedStorage.CombatSystem.Libs;
	WeaponAnimations = script.Animations.Weapons;
}

local Modules = {
	Config = require(Folders.Libs.Config);
}

local Remotes = {
	Hitbox = Folders.Remotes.Hitbox;
}

local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")

local Categories = {
	"Katana";
	"Fists";
}

local CurrentType = nil
local isEquipped = false
local canAttack = false
local isAttacking = false

local Combo = 1

local tool

local Animations = {
	Weapons = {
		Katana = {
			Attack1 = Folders.WeaponAnimations.Katana.Attack1;
			Attack2 = Folders.WeaponAnimations.Katana.Attack2;
			Attack3 = Folders.WeaponAnimations.Katana.Attack3;
			Attack4 = Folders.WeaponAnimations.Katana.Attack4;
			Attack5 = Folders.WeaponAnimations.Katana.Attack5;
		};
	};
}

local AnimationTracks = {
	Weapons = {
		Katana = {
			Attack1Track = Humanoid.Animator:LoadAnimation(Animations.Weapons.Katana.Attack1);
			Attack2Track = Humanoid.Animator:LoadAnimation(Animations.Weapons.Katana.Attack2);
			Attack3Track = Humanoid.Animator:LoadAnimation(Animations.Weapons.Katana.Attack3);
			Attack4Track = Humanoid.Animator:LoadAnimation(Animations.Weapons.Katana.Attack4);
			Attack5Track = Humanoid.Animator:LoadAnimation(Animations.Weapons.Katana.Attack5);
		};
	};
}

Character.ChildAdded:Connect(function(Obj)
	if Obj:IsA("Tool") then		
		tool = Obj		
		if Obj.Name == Categories[1] then			
			CurrentType = Categories[1]			
			isEquipped = true			
			canAttack = true		
		elseif Obj.Name == Categories[2] then			
			CurrentType = Categories[2]			
			isEquipped = true			
			canAttack = true		
		end
	end
end)

Character.ChildRemoved:Connect(function(Obj)
	if Obj:IsA("Tool") then		
		tool = Obj		
		if Obj.Name == Categories[1] then		
			Remotes.Hitbox:InvokeServer(Modules.Config.Weapons["Katana"].Damage, false, false, tool:WaitForChild("Handle"))
			CurrentType = nil		
			isEquipped = false			
			canAttack = false		
		elseif Obj.Name == Categories[2] then	
			CurrentType = nil	
			isEquipped = false			
			canAttack = false		
		end
	end
end)

local function Attack(Category: string, Model: BasePart)
	Combo += 1
	if Combo > 0 and (Combo <= Modules.Config.Weapons.Katana.Combos) then
		canAttack = false
		local AttackTrack
		AttackTrack = AnimationTracks.Weapons[Category]["Attack"..tostring(Combo).."Track"]
		AttackTrack:Play()

		AttackTrack:GetMarkerReachedSignal("HitStart"):Connect(function()
			Remotes.Hitbox:InvokeServer(Modules.Config.Weapons[Category].Damage, false, true, Model, AttackTrack.Length)
		end)
		AttackTrack:GetMarkerReachedSignal("HitEnd"):Connect(function()
			Remotes.Hitbox:InvokeServer(Modules.Config.Weapons[Category].Damage, false, false, Model)
		end)
		task.wait(Modules.Config.Weapons.Katana.AttackCooldown)
		canAttack = true
	elseif Combo > 0 and (Combo > Modules.Config.Weapons.Katana.Combos) then
		Combo = 1
		canAttack = false
		local AttackTrack
		AttackTrack = AnimationTracks.Weapons[Category]["Attack"..tostring(Combo).."Track"]
		AttackTrack:Play()
		AttackTrack:GetMarkerReachedSignal("HitStart"):Connect(function()
			Remotes.Hitbox:InvokeServer(Modules.Config.Weapons[Category].Damage, false, true, Model, AttackTrack.Length)
		end)
		AttackTrack:GetMarkerReachedSignal("HitEnd"):Connect(function()
			Remotes.Hitbox:InvokeServer(Modules.Config.Weapons[Category].Damage, false, false, Model)
		end)
		task.wait(Modules.Config.Weapons.Katana.ComboCooldown)
		canAttack = true
	end
	print(Combo)
end

UserInputService.InputBegan:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseButton1 then
		if isEquipped and canAttack then
			if CurrentType == "Fists" then
			elseif CurrentType == "Katana" then
				Attack("Katana", tool:FindFirstChild("Handle"))
			end
		end
	end
end)

Server Script:

local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerStorage = game:GetService("ServerStorage")

local Folders = {
	Main = ReplicatedStorage.CombatSystem;
	Remotes = ReplicatedStorage.CombatSystem.Remotes;
	Libs = ReplicatedStorage.CombatSystem.Libs
}

local Modules = {
	Config = require(Folders.Libs.Config);
	ClientCast = require(ServerStorage.Libs.ClientCast)
}

local Remotes = {
	Hitbox = Folders.Remotes.Hitbox
}

--[[
local function isPlayerInFrontOfPlayer(player1: (Humanoid), player2: (Humanoid)): bool
	local dirToOtherPlayer: (Vector3) = (player2.Parent.PrimaryPart.Position - player1.Parent.PrimaryPart.Position).unit
	return player1.Parent.PrimaryPart.CFrame.LookVector:Dot(dirToOtherPlayer) > 0.45
end
]]

local ClientCaster

local Debounce = {}
Remotes.Hitbox.OnServerInvoke = function(player, Damage: number, hitboxVisibilityEnabled, Status: boolean, DamageModel: BasePart, Length: number)
	local casterParams = RaycastParams.new()
	casterParams.FilterDescendantsInstances = {player.Character, DamageModel}
	casterParams.FilterType = Enum.RaycastFilterType.Blacklist
	
	ClientCaster = Modules.ClientCast.new(DamageModel, casterParams)
	ClientCaster:SetOwner(player)
	if Status then
		ClientCaster:Start()
	else
		ClientCaster:Stop()
	end
	
	ClientCaster.HumanoidCollided:Connect(function(RaycastResult, HitHumanoid)
		if HitHumanoid ~= player.Character:WaitForChild("Humanoid") then
			if Debounce[HitHumanoid] then
				return
			end
			Debounce[HitHumanoid] = true
			HitHumanoid:TakeDamage(Damage)
			wait(0.5)
			Debounce[HitHumanoid] = false
		end
	end)
end

I don’t know how to fix this, since it is my first time using ClientCast.