Welding an alive player to a dead player kills the alive player

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want to be able to weld a character to another character for a grab ability in my fighting game

  2. What is the issue? Include screenshots / videos if possible!

The character dies if I weld them to a dead character.

As you can see, the person performing the grab dies when they try to grab me.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I tried using a Motor6D and a rigid constraint. Both of them had the exact same problem.
    I also tried using an align position and orientation, however, the position of the person who is grabbed is delayed to the grabbers position on the client because of ping.

My current grab code:

local att0 = Instance.new("Attachment", hrp)
local att1 = Instance.new("Attachment", ehrp)
att1.CFrame = grabCFrame
local weld = Instance.new("RigidConstraint")
weld.Name = "GrabWeld"
weld.Enabled = false
weld.Attachment0 = att0
weld.Attachment1 = att1
weld.Parent = att1
weld.Enabled = true

I’m pretty sure this is just an engine bug. If I could get the align position method to not be delayed then I would use that however I’m not sure of how to do that.

1 Like

Honestly I have no clue how the RigidConstraint works, I instead recommend using an actual weld.

local weld = Instance.new("Weld")
weld.Name = "GrabWeld"
weld.Part0, weld.Part1 = hrp, ehrp
-- set/change the C0/C1 of the weld if you want the roots not to be inside of eachother.
weld.Parent = ehrp
1 Like

I tried this and got the same bug

1 Like

Try setting the weld’s parent to the hrp.

weld.Parent = hrp
1 Like

Thats what I originally did. I’ll try parenting it to the enemy hrp.

1 Like

I still get the same problem. I think any form of weld will cause the issue to happen.

1 Like

Yeah the HumanoidRootPart getting disconnected from the motor6d with the torso, check if this bond gets broken if it does that is the reason why the player is getting killed.

1 Like

Ok so I tried making the same thing using align position and align orientation but as you can see, there is a very visible delay.

Is there a way I can make it so on the client, there is no visible delay?

1 Like

you could lerp it instead of welding it

I removed the delay by just manually updating the position of the grabbed person on the grabber’s client in a renderstepped event