Weird Weld Issue

I’m making a client vfx replicated however i have come across a weird welding issue, whenever i deal damage while I’m also taking damage i get bugged like i tp to the victim and get stuck. i imagine it has something to do with the local script.

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local collectionservice = game:GetService("CollectionService")


----Varibles
local Remotes = ReplicatedStorage.Remotes
local ClientVfx = Remotes.Client.ClientVFX



ClientVfx.OnClientEvent:Connect(function(Position,Name,Count,Time,Enabled, WeldTable)
	local effecttag = collectionservice:GetTagged("Effect")
	
	for i,v in pairs(effecttag) do
		if v.Name == Name then
			local cloneeffect = v:Clone()
			if WeldTable == nil then
				print("1")
				cloneeffect.Parent = workspace
				cloneeffect.Position = Position
				
			else
				print("2")
				cloneeffect.Parent = workspace
				cloneeffect.Position = Position
				local weld = Instance.new("Weld")
				weld.Part0 = WeldTable[1]
				weld.Part1 = cloneeffect
				weld.C0 = WeldTable[2]
				weld.Parent = cloneeffect
			end
			
			for i,s in cloneeffect:GetChildren() do
				if s:IsA("ParticleEmitter") then
					s:Emit(s:GetAttribute("EmitCount"))
				end
				
			end
			task.delay(Time, function()
				cloneeffect:Destroy()
			end)
		end
	end
	
end)


-----Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Debris = game:GetService("Debris")
local ServerScriptService = game:GetService("ServerScriptService")


-----Modules
local BlockHandler = require(script.BlockHandler)

-----Remotes

local Remotes = ReplicatedStorage.Remotes
local ClientVfx = Remotes.Client.ClientVFX
local ClientAnimator = Remotes.Client.ClientAni

local DamageHandler = {}




----Example
local DmgTable = {
	Damage = 7,
	IsEvadable = true,
	PostureDamage = 15,
	Stunduration = 0,
	
}

function DamageHandler.ApplyDamage(character, Victim, DmgTable)
	local CharacterHum = character:WaitForChild("Humanoid")
	local VictimHum = Victim:WaitForChild("Humanoid")
	local victimHRP = Victim:FindFirstChild("HumanoidRootPart")
	local block = BlockHandler.Block(character, Victim, DmgTable)
	
	if block == "Blocked" then return end
	
	local weldtable = { victimHRP, CFrame.new() } 
	
	
	ClientVfx:FireAllClients(victimHRP.Position,"Damage",25,0.9,true, weldtable)
	
	VictimHum:TakeDamage(DmgTable.Damage)
	
	return "Hit"
end



return DamageHandler

Well your welding effects to the victim of an attack, yes? And you say that this only happens if both of you are attacking?

This might be a stretch, but is there a chance the welds are interacting with the hitboxes? I don’t know the full extent of your systems, so this might be extremely far off.

Additionally, I don’t know how this would be related specifically to when both users are attacking, but could you also be getting hit by your own hitbox?

That is interesting, however my hitbox does avoid everything that is me and avoids anything that doesn’t have a humanoid, so it shouldn’t be hitting me.

		local params : HitboxTypes.HitboxParams = {
			SizeOrPart = Vector3.new(5, 4, 5),
			SpatialOption = "InBox",
			DebounceTime = 0.5, 
			Debris = 0.2,
			Debug = true, 
			Blacklist = { chr },
			LookingFor = "Humanoid",
			VelocityPrediction = true,
		}

		local hitbox, created = HitboxClass.new(params)
		if not created then
			warn("M1Handler: Hitbox creation failed for " .. player.Name)
			return
		end

		hitbox:WeldTo(chr:WaitForChild("HumanoidRootPart"), CFrame.new(0, 0, -(params.SizeOrPart.Z / 2 + 0.5))) 

		local alreadyHitInThisSwing = {}
		hitbox.HitSomeone:Connect(function(victims)
			for _, victimCharacter in ipairs(victims) do 
				local victimHum = victimCharacter:FindFirstChildOfClass("Humanoid") 

				if victimHum and victimHum.Health > 0 and not alreadyHitInThisSwing[victimCharacter] then
					alreadyHitInThisSwing[victimCharacter] = true

					local hitStatus = DamageHandler.ApplyDamage(chr, victimCharacter, DmgTable)

				end
			end
		end)

		task.delay(0.4, function()
			hitbox:Start()
		end)