Server ragdolls being weird and humanoidrootpart not updating to character position

I know having physics in the server can be weird, but I want the ragdoll to atleast align and update with the humanoidrootpart, here’s a picture of what I mean.
image
Here’s the ragdoll code.

-- Ragdoll Function
local function Ragdoll(character, killCharacter)
	-- Variables
	local humanoid = character:FindFirstChildWhichIsA("Humanoid")
	local hrp = character:FindFirstChild("HumanoidRootPart")

	-- Kill
	humanoid:SetAttribute("RequiresNeck", humanoid.RequiresNeck)
	humanoid.RequiresNeck = killCharacter or false

	-- Ragdoll Rigging
	for _,descendant in ipairs(character:GetDescendants()) do
		if descendant:IsA("Motor6D") and (descendant.Part0 ~= hrp) then
			-- Attachments
			if not descendant.Parent:FindFirstChild(descendant.Name .. "RigAttachment") then
				local Attachment = Instance.new("Attachment")
				Attachment.Name = (descendant.Name .. "RigAttachment")
				Attachment.CFrame = descendant.C1
				Attachment.Parent = descendant.Part1

				Attachment = Attachment:Clone()
				Attachment.CFrame = descendant.C0
				Attachment.Parent = descendant.Part0
			end

			-- Socket
			local Socket = Instance.new("BallSocketConstraint")

			Socket.Attachment0 = descendant.Part0:FindFirstChild(descendant.Name .. "RigAttachment")
			Socket.Attachment1 = descendant.Part1:FindFirstChild(descendant.Name .. "RigAttachment")
			
			Socket.LimitsEnabled = true
			Socket.TwistLimitsEnabled = true

			Socket.Name = (descendant.Name .. "Joint")
			Socket.Parent = descendant.Parent

			-- Collision
			local collision = Instance.new("NoCollisionConstraint")
			collision.Part0 = descendant.Part0
			collision.Part1 = descendant.Part1
			collision.Parent = descendant.Parent

			-- Motor6D
			descendant.Enabled = false
		end
	end
	for i,v in pairs(character:GetChildren()) do
		if v:IsA("BasePart") then
			local partclone = v:Clone()
			v.CanCollide = false
			partclone:ClearAllChildren()
			partclone.Size = Vector3.new(1,1,.5)
			partclone.Parent = v
			partclone.Transparency = 1
			partclone.Name = "Joint"
			partclone.CanCollide = true
			local WELD = Instance.new("Weld",partclone)
			WELD.Part0 = partclone
			WELD.Part1 = v
		end	
	end
	humanoid.PlatformStand = true


	hrp.CanCollide = false
	--humanoid.AutoRotate = false
	hrp:SetNetworkOwner(nil) -- sets the network owner to the server
end
2 Likes

For more context: The humanoidrootpart does not realign with the player, because the physics is set to server, but I want the ragdoll to look decent, while combatting exploiters…

1 Like

Here’s a clip that kind of shows what I mean, ragdoll is at like 0:02 or 0:03…
https://gyazo.com/d4a37c4c0373e0dc674536c4e60f47e7