I’m making an attack where when you’re hit once you cannot be hit again but it’ll still do damage, and on the final hit it deletes a weld and does the knockback and ragdoll (not the issue) the issue is deleting the weld. To delete the weld I iterate through all descendants of the character (V) and check for the weld
for I,V:Model in ipairs(HitPeople[Character]) do
local HitHumanoid = V:FindFirstChildOfClass("Humanoid")
local HitRoot = V:FindFirstChild("HumanoidRootPart")
local VData = Modules.Manager:Retrieve(V)
Modules.Functions.Damage(V, DamageData, Character)
local P = {
["Volume"] = 0.2,
["Parent"] = V.PrimaryPart,
["RollOffMode"] = Enum.RollOffMode.Linear
}
SoundService.PlaySound(HitSound, P, HitSound.TimeLength)
local ACData = {
V,
2,
true,
{Offset = 5, Height = 0, Distance = 4}
}
if VData.Status.AirCombo then
Modules.Functions.AirCombo(Character, ACData)
end
if Arg == "Final" then
table.clear(HitPeople[Character])
print("Finalizing Hit")
local KBData = {
true,
110,
80
}
for Index,weldthing in ipairs(V:GetDescendants()) do
if weldthing:IsA("WeldConstraint") then
game:GetService("Debris"):AddItem(weldthing)
end
end
if Data.Status.AirCombo then
Data.Status.AirCombo = false
Modules.Functions.RemoveAirCombo(Character)
end
Modules.RagdollService:RagdollCharacter(V, 2)
Modules.Functions.Knockback(V, KBData, Character)
end
end