Humanoid.PlatformStand flings player on getup

I tried this method to fix a previous issue, however it flings the player when they get up. How can I stop this from happening?

function Ragdoll(value: boolean)
	if value then
		Humanoid.PlatformStand = true
		Humanoid:ChangeState(Enum.HumanoidStateType.Ragdoll)
		Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp, false)
		replaceJoints()
		push()
	else 
		Humanoid.PlatformStand = false
		resetJoints()
		Humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
	end
end

scuffed solution:

function Ragdoll(value: boolean)
	if value then
		Humanoid.PlatformStand = true
		Humanoid:ChangeState(Enum.HumanoidStateType.Ragdoll)
		Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp, false)
		replaceJoints()
		push()
	else 
		resetJoints()
		Humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
		task.delay(0, function()
			Humanoid.PlatformStand = false
		end)
	end
end

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.