Is it Possible to Disable Character "Ragdolling"

What I mean by ragdolling:

As you can see, I briefly lose control of my character when I crawl between the sink and the wall.

I want to disable in it in my game as in my opinion, it creates a poor experience, however the there does not seem to be an option in the humanoid to disable it. I would look on the Dev Hub but i have no idea what the technical term for this is.

6 Likes

humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)

Is this what youre looking for?

Link

2 Likes

It sounds right. Should I put this in a localscript or server script?

This would go in a LocalScript inside StarterPlayer.StarterCharacterScripts

To do this you would use .StateChanged function and with the parameters, check for the oldstate and newstate. If the newstate is Enum.HumanoidStateType.Ragdoll then you would disable this with humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)

Doesnt work. I did this script

local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")

humanoid.StateChanged:Connect(function(oldState, newState)
	if newState == Enum.HumanoidStateType.Ragdoll then
		humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)
	end
end)

I still can get flung around like in the video.

Hmm, I dont know if this is recommended or not but can you try this?

local char = script.Parent;
local hum = char:WaitForChild("Humanoid");

while true do
wait();
if hum.HumanoidStateType == Enum.HumanoidStateType.Ragdoll then
      hum:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false);
end;
end;

I believe you can make this server sided. Use the PlayerAdded event and getting the humanoid.

Tried this script and even set ragdolling to true and none seem to have an effect.

Reviving the topic just incase someone needs help in the future.
The solution is really easy, you got to disable BOTH the ragdoll and the faillingdown humanoid states to completely disable the ragdoll, so it’s as simple as:

humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)
humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)

do it in a LocalScript since the client owns their humanoid.

25 Likes

I’m tried this. This is dont work. I’m still ragdolling and nothing changes.

I’m found how to disable ragdolling:

local char = script.Parent;
local hum = char:WaitForChild("Humanoid")


hum.StateChanged:Connect(function(oldState, newState)
	hum:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)
	hum:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
end)

If u try to do hum.HumanoidStateType == Enum.HumanoidStateType.Ragdoll it’s just don’t work

2 Likes

placed it inside of StarterCharacterScript and its not working, any ideas?

5 Likes

You did this in local script? If u did this in script this wont work

1 Like

Thank you, this worked for me.

1 Like