#ragdoll player getting up help

1 messages · Page 1 of 1 (latest)

runic ibex
#

basically i need help after a player gets knocked down they cant get back up like pressing jump n stuff how do i fix this.

function ragdoll.Stop(character)
local hrp = character:FindFirstChild("HumanoidRootPart")
local hum = character:FindFirstChild("Humanoid")

hum.PlatformStand = false

for i, joint in pairs(character:GetDescendants()) do
    if joint:IsA("BallSocketConstraint") then
        joint:Destroy()
    end

    if joint:IsA("Motor6D") then
        joint.Enabled = true
    end
end

character.Ragdoll.Value = false

hum:ChangeState(Enum.HumanoidStateType.GettingUp)

hum.WalkSpeed = 16
hum.JumpPower = 50

hum.AutoRotate = true

end

crystal laurel
#

Add the following right after you call hum:ChangeState(GettingUp):

task.delay(0.1, function()
if hum and hum:GetState() ~= Enum.HumanoidStateType.Running then
hum:ChangeState(Enum.HumanoidStateType.Running)
end
end)
This gives a short delay before transitioning to Running, which can help the state machine reset properly.