When player is ragdolled they will sometimes get pushed up

Im making a dropper game where you ragdoll down and when you ragdoll, you sometimes get pushed up. Clip:

My Code:

local function ragdollChar(character, humanoid)

	humanoid.AutoRotate = false
	character.HumanoidRootPart.Anchored = false
	humanoid.PlatformStand = false

	humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp,false)
	humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll,true)
	humanoid:ChangeState(Enum.HumanoidStateType.Ragdoll)
	humanoid:SetStateEnabled(Enum.HumanoidStateType.Running,false)

	humanoid.StateChanged:Connect(function(Old, new)
		if new == Enum.HumanoidStateType.Freefall or new == Enum.HumanoidStateType.FallingDown or new == Enum.HumanoidStateType.Landed then
			humanoid:ChangeState(Enum.HumanoidStateType.Ragdoll)
			humanoid:SetStateEnabled(Enum.HumanoidStateType.Freefall, false)
			humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
			humanoid:SetStateEnabled(Enum.HumanoidStateType.Landed, false)
		end
	end)

	character:WaitForChild("Animate").Disabled = true

	for i, v in pairs(character:GetDescendants()) do

		if v:IsA("Motor6D") and v.Parent.Name ~= "HumanoidRootPart" then

			local attach0 = Instance.new("Attachment")
			attach0.CFrame = v.C0
			attach0.Parent = v.Part0

			local attach1 = Instance.new("Attachment")
			attach1.CFrame = v.C1
			attach1.Parent = v.Part1

			local BallSocketConstraint = Instance.new("BallSocketConstraint")
			BallSocketConstraint.Parent = v.Parent
			BallSocketConstraint.Name = v.Name
			BallSocketConstraint.Attachment0 = attach0
			BallSocketConstraint.Attachment1 = attach1
			BallSocketConstraint.LimitsEnabled = true
			BallSocketConstraint.TwistLimitsEnabled = true
			BallSocketConstraint.Enabled = true
			v.Enabled = false
			
		elseif v:IsA("MeshPart") or v:IsA("BasePart") or v:IsA("CharacterMesh") and v.Name ~= "HumanoidRootPart" then
			v.CanCollide = false
		end

		humanoid.AutoRotate = false
		character.HumanoidRootPart.CanCollide = false

	end



end

script.Parent:WaitForChild("RagdollPart").Touched:Connect(function(Hit)

	local char = Hit:FindFirstAncestorWhichIsA("Model")

	if char and char:FindFirstChild("Humanoid") then
		if not char:GetAttribute("Ragdolled") then
			char:SetAttribute("Ragdolled", true)

			char.Humanoid.WalkSpeed = 50

			ragdollChar(char, char:FindFirstChild("Humanoid"))

		end
	end

end)

this method of ragdoll is very buggy and roblox dont seem to want to fix it, but theres no other ragdoll methods as visually good at this

Maybe decrease jump power or/and use platformstand humanoid property value while ragdolled*.

When I toggle platform stand the player is unable to move.

That’s what it usually does, I use that as ragdoll toggle so the player can’t walk around and such when I’m using ragdoll for stuff. But I think what could probably really solve it, is probably adding no collision constraints between certain body parts so it isn’t having physics issues probably but it may need some experimenting with since I don’t really have a setup right now to test it.