Main player dying when welded other player dies super simple fix!

I was having a problem with my main player dying when the other player died when welded to the main player. It took me forever to find a fix and it’s very simple too, at most (generally) 2 lines.

First line, which is put before the weld is made -

OtherPlayerHumanoid:SetStateEnabled(Enum.HumanoidStateType.Dead, false)

Second line, which is put after the weld is finished -

OtherPlayerHumanoid:SetStateEnabled(Enum.HumanoidStateType.Dead, true)

I just found this out and am not sure what the side effects of using this method could be, so if this method isn’t that great and you are 100% there is a better way of welding players together without both dying when the other player dies, comment it, please!

This shouldn’t be happening on the server, only on the client.

for welding players, you can use “AlignPosition” and “AlignOrientation”, they both use Attachments,
Part0 = DraggedPlr.HumanoidRootPart.RootAttachment
Part1 = Plr.HumanoidRootPart.RootAttachment ; main issue is collision, you can fix that by using “CollisionGroups”, good luck :3

Is there any difference? Works on server for me