How to fix weird physics when welding players

So I’ve been trying to figure out grabs/takedowns in studio for a while now.
I got these two functions from a different post:

local ps=game:GetService("PhysicsService")

ps:CreateCollisionGroup("nocol")
ps:CollisionGroupSetCollidable("nocol","nocol",false)

local function weldPlayers(origin,carry, cf)
	local ro,rc=origin.HumanoidRootPart,carry.HumanoidRootPart
	carry.Humanoid.PlatformStand=true
	local w=Instance.new("Weld")
	w.Name="__PLAYERWELD"
	w.Part0=rc
	w.Part1=ro
	w.C1=cf
	w.Parent=rc
	for _,v in pairs(carry:GetChildren()) do
		if v:IsA("BasePart") then
			v.CollisionGroup = "nocol"
			v.Massless=true
		end
	end
	for _,v in pairs(origin:GetChildren()) do
		if v:IsA("BasePart") then
			v.CollisionGroup = "nocol"
		end
	end
end

local function restorePlayer(char)
	char.Humanoid.PlatformStand=false
	if char.HumanoidRootPart:FindFirstChild("__PLAYERWELD") then
		for i, v in pairs(char:GetDescendants()) do
			if v.Name == "__PLAYERWELD" then
				v:Destroy()
			end
		end
	end
	for _,v in pairs(char:GetChildren()) do
		if v:IsA("BasePart") then
			v.CollisionGroup="Players"
			v.Massless=false
		end
	end
end

and they work pretty well, as seen here:

My issue comes when I want to weld player 2 to player 1, when player 2 is moving at high speeds. As can be seen here, when you grab someone whose falling, it results in some weird physics jank:

So I need to figure out how to fix it. I’ve tried changing network ownership of player2’s character to player1, but that didn’t seem to work.

2 Likes