Trying to use weld to two character each other, without them dying both, when one get dmgs

im really tweaking out fr, im search, and searching, and searching, and searching, and searching, and searching, and searching AND IM NOT FINDING ANYTHING, PLEASE HELP.

my problem is that im making a grab attack, by server, AND I DONT WANT TO USE ALIGNPOSITION,
and literaly cant make anything good, NO CHANGES, of this bug or something, when the victim gets damage at his final health while the character is grabbing him, DIES BOTH, AND IM SEEIGN PEOPLE THAT ACOMPLISH THAT PROBLEM AND I DONT UNDERSTAND HOW, HOW, HOW, i have a copy of a game that USE weld, AND DOESNT HAVE THAT PROBLEM, and im trying to find how is deleting the weld without this bug, and i still dont understand HOW, is by changing the humanoidstate’???‘?, is by do some weird thing to do with parent’??? i dont understand GOD.

here my script though:

local lol_XD = require(game.ServerScriptService.Main.Pvp_Stuff.MoveSets.Triger_Tabs)
local weld_folders = game.ServerStorage.MainStorage.ItemsToClone.Welds
function module.Grab_type1(Argument, Enemy, you, Animation_On, CFrame_Attachment, CFrame_End_of_Grab, With_endCframe, Rotation, Player_Animation, Enemy_Player, Time_WalksSpeed, Walk_Speed)
	local RotEnemy = Enemy.HumanoidRootPart
	local char = you.Character
	local HumanoidEnemy = Enemy.Humanoid
	local rp_enemy = Enemy["HumanoidRootPart"]
	local run = game:GetService("RunService")
	
	local ws_val = you:WaitForChild("PvpFolder"):WaitForChild("Attack_walkSpeed")
	
	ws_val.Value = Walk_Speed
	
	local value = Instance.new("NumberValue", char:WaitForChild("Values"))
	value.Name = "Attack_Test"
	value.Value = Time_WalksSpeed
	
	local anim = Enemy_Player:Clone()
	anim.Parent = Enemy
	local animationa = HumanoidEnemy:LoadAnimation(anim)
	animationa:Play()
	Player_Animation:Play()

	HumanoidEnemy.AutoRotate = false
	
	Enemy:SetAttribute("GettingBeatdown", true)

	RotEnemy.Massless = true
	RotEnemy:SetNetworkOwner(you)
	HumanoidEnemy.PlatformStand = true
	local clone
	
	if CFrame_Attachment == "something" then
		clone = weld_folders.Tesadasd:Clone()
		clone.Part0 = char.HumanoidRootPart
	else
		clone = weld_folders.Grab_weld:Clone()
		clone.Part1 = char.HumanoidRootPart
	end

	clone.Parent = RotEnemy
	clone.Part1 = RotEnemy
	
	task.spawn(function()
		lol_XD.Function(Argument, you, Player_Animation)
	end)
	local AnimationTracks = char["Humanoid"]:GetPlayingAnimationTracks()
	for i, track in pairs (AnimationTracks) do
		if track == Player_Animation then
			track:GetMarkerReachedSignal("End_Player"):Connect(function(paramString)
				char:SetAttribute("Beatdown", false)
				for i, v in pairs(you.Character:FindFirstChild("Values"):FindFirstChild("NormalVals"):GetChildren()) do
					if v:IsA("ObjectValue") and v.Name == "Target" then
						v:Destroy()
					end
				end
				task.delay(Time_WalksSpeed,function()
					value:Destroy()
				end)
			end)
			track:GetMarkerReachedSignal("End_Enemy"):Connect(function(paramString)
				if With_endCframe == true then
					RotEnemy.CFrame = RotEnemy.CFrame * CFrame_End_of_Grab
				end
				HumanoidEnemy.AutoRotate = true
				Enemy:SetAttribute("GettingBeatdown", false)
				animationa:Destroy()
				clone.Parent = nil

				RotEnemy.Massless = false
				RotEnemy:SetNetworkOwner(Enemy)
			end)
		end
	end
end
1 Like

hijhmazjmidzk,<azok,zok,ak,ozsdpl.fdg,

fr someone awnser me dude, im tweaking

I think if you’re using welds that aren’t WeldContriants, that might happen.

But an alternative would be to just CFrame the other one that is being welded onto the main one.

For example, looping the cframe of one of the character’s HRP, best would be to use RunService

local welding = true

local connection
connection = game:GetService("RunService").RenderStepped:Connect(function()
       if char2 == nil then connection:Disconnect() end
        if not welding then connection:Disconnect() end
        char2.HumanoidRootPart.CFrame = char1.HumanoidRootPart.CFrame * CFrame.new(0,0,-1)
end)

the code above is just an example of cframing one of the chars hrp, it acts like a weld (i think)

or a solution i think is to remove the weld if one of the char’s health is almost or below to 0 when applying damage to the humanoid

i just find a way out, AND IS REALLY STUPID TO SAY, but it did work.

you have to delet the weld IN OTHER SCRIPT, like when damaging i added a way to do a for loop, for finding a weld in character, AND WORKS, out no reason

but there a problem still, the for loop cant catch the weld, by using getchildren inside the victim:

        for i, v in pairs(enemy:GetChildren()) do
            if v:IsA("Weld") or v.Name == "Attach_Character" then
                v:Destroy()
            end
        end

why not use GetDescendants? (although that might affect performance… you could)

or in fact, why not get the children of the HRP where the weld is located ( i assume it’s located there)