Problem with humanoidstates

I read in a previous dev forum post that you can use Ragdoll HumanoidState instead of Platformstand for a more efficient, and clean way of having a player get up from falling down, however, when I try running this when a player gets hit:

hum:SetStateEnabled(Enum.HumanoidStateType.Ragdoll,true)
hum:SetStateEnabled(Enum.HumanoidStateType.GettingUp,false)
hum:ChangeState(Enum.HumanoidStateType.Ragdoll)
wait(.5+(power/50))
print(hum:GetState())
hum:SetStateEnabled(Enum.HumanoidStateType.Ragdoll,false)
hum:SetStateEnabled(Enum.HumanoidStateType.GettingUp,true)

The player getting hit doesn’t fall over and can move still, and when I print the GetState() it says it’s in the running state.

According to the HumanoidStateType:

When altering the Humanoid of a player, this should be done from a LocalScript ran by that player. Certain states only work locally. (Dead for example)

So is your code in a (server) Script or a (client) LocalScript?

1 Like

Oh sorry, forgot that I didn’t update this, I was reading the ragdoll wiki page and never the humanoidstatetype one because I’m big brain, I had this figured out a while ago, but yeah.