How do you stop the player from freezing after getting up from a ragdoll?

Hello All,

I’ve been messing around with ragdolls lately and I’ve noticed an issue I can’t seem to find a solution for (or at least the solutions I have found don’t seem to work).

Whenever I make the character stand up from a ragdoll, it seems to just freeze in place and disables the players ability to move at all for a few seconds.

Clip:
56252d9cd66ed3c09e21ef0e35d90706

The Calling of the Ragdoll Module:

if status.Value then
		local highlight = ch:FindFirstChild("TeamColor")
		if highlight then
			TS:Create(highlight,TweenInfo.new(1,Enum.EasingStyle.Sine),{OutlineTransparency=0}):Play()
		end
		
		ch.Head.face.Texture = SS.Assets.Faces.Neutral.Texture
		task.spawn(function()
			hrp.Position = hrp.Position + Vector3.new(0,2,0)
			
			rag.Ragdoll(ch,false)
			hum.PlatformStand = false
		end)
	else
		local highlight = ch:FindFirstChild("TeamColor")
		if highlight then
			TS:Create(highlight,TweenInfo.new(1,Enum.EasingStyle.Sine),{OutlineTransparency=0.5}):Play()
		end
		
		ch.Head.face.Texture = SS.Assets.Faces.Killed.Texture
		task.spawn(function()
			hum.PlatformStand = true
			rag.Ragdoll(ch,true)
		end)
	end

The Ragdoll Code:

local Torso = Character:FindFirstChild("Torso")
	local Humanoid = Character:FindFirstChildWhichIsA("Humanoid")
	local HumanoidRootPart = Character:FindFirstChild("HumanoidRootPart")
	local Player = game:GetService("Players"):GetPlayerFromCharacter(Character)
	if not Torso then return warn(tostring(Character),"did not have an existing torso when attempting to ragdoll them") end
	if not Humanoid then return warn(tostring(Character),"did not have an existing humanoid when attempting to ragdoll them") end
	if not HumanoidRootPart then return warn(tostring(Character),"did not have an existing humanoidrootpart when attempting to ragdoll them") end
	if Set then
		if game.CollectionService:HasTag(Character, "IsRagdolled") then
			return
		end
		game.CollectionService:AddTag(Character, "IsRagdolled")
		Humanoid.PlatformStand = true
		Humanoid.RequiresNeck = false
		Humanoid.AutoRotate = false
		local Character_Descendants = Character:GetDescendants()
		for Index = 1,#Character_Descendants do
			local Object = Character_Descendants[Index]
			if Object:IsA("BasePart") and not Object:FindFirstChild("Bone") and Object.Name ~= "Bone" and Object.Name ~= "Hilt" and not Object:FindFirstChild("Stats") then
				local Bone = Object:Clone()
				Bone:ClearAllChildren()
				Bone.Name = "Bone"
				Bone.Size = Bone.Size/2
				Bone.CanCollide = true
				Bone.Massless = true
				Bone.Transparency = 1
				Bone.Parent = Object
				local Weld = Instance.new("Weld")
				Weld.Part0 = Bone
				Weld.Part1 = Object
				Weld.Parent = Bone
			end
			if Object:IsA("BasePart") and Object.Anchored == false and Object:IsDescendantOf(game.Workspace) then
				pcall(function()
					--Object:SetNetworkOwner(nil)
				end)
			end
			if Object:IsA("Motor6D") and (Object.Name == "Neck" or Object.Name == "Left Hip" or Object.Name == "Left Shoulder" or Object.Name == "Right Hip" or Object.Name == "Right Shoulder") then
				Create[Object.Name](Character)
			end
		end
	else
		if game.CollectionService:HasTag(Character, "IsRagdolled") then
			game.CollectionService:RemoveTag(Character, "IsRagdolled")
		end
		Humanoid.PlatformStand = false
		Humanoid.RequiresNeck = true
		Humanoid.AutoRotate = true
		local BodyGyro = script.BodyGyro:Clone()
		BodyGyro.Parent = Character.HumanoidRootPart
		game.Debris:AddItem(BodyGyro,0.4)
		local Character_Descendants = Character:GetDescendants()
		for Index = 1,#Character_Descendants do
			local Object = Character_Descendants[Index]
			if Object:IsA("BasePart") and Object.Anchored == false and Object:IsDescendantOf(game.Workspace) then
			
				Object:SetNetworkOwner(Player)
			end
			if Object:IsA("Motor6D") and (Object.Name == "Neck" or Object.Name == "Left Hip" or Object.Name == "Left Shoulder" or Object.Name == "Right Hip" or Object.Name == "Right Shoulder") then
				Object.Part0 = Torso
			end
			if Object.Name == "Bone" or Object.Name == "RagdollAttach" or Object:IsA("BallSocketConstraint") then
				Object:Destroy()
			end
		end
		wait()
		for i,v in pairs(Character:GetChildren()) do
			if v.Name == "WakingUp" then
				v:Destroy()
			end
		end
	end

I’ve looked at multiple different threads and it seems like the solutions they’ve all had don’t seem to work for me, any suggestions?

I think this is because of the Ragdoll HumanoidStateType (this is different from your actual ragdolling system), try to humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false) before un-ragdolling them, then re-enable the state after a second or so.