Weird limb movement in ragdoll state

Hello. I know there’s a ton of topics about ragdoll. But I have a weird problem:

As you can see on the video, when I ragdoll the npc with my ragdoll module, it falls down and it’s limbs start to move really weird. I’ve tried to make a collision group for parts of the character:

local PS = game:GetService("PhysicsService")
PS:CreateCollisionGroup("RagdollParts")
PS:CollisionGroupSetCollidable("RagdollParts","RagdollParts",true)

--When ragdolling
for i,v in pairs(char:GetDescendants()) do
if v:IsA("Part") or v:IsA("MeshPart") then
PS:SetPartCollisionGroup(v,"RagdollParts")
end
end

Well, this fixed the issue for some seconds, but after I came close to the npc, the same bug appeared:

I have limits enabled on all my sockets, so that’s not the issue. I think that I’m not the only one who faces this problem, so it would be great to solve it and share. Any help is appreciated!

2 Likes

It’s the fault of the humanoid forcing this behavior, even when set to a state with limb collision it always tends to switch back.

Yep that’s one of the triggers, the player client is attempting to gain network ownership over the npc for physics simulation reasons with simulation radius, hence humanoid as well and cause humanoid state changes to occur.

Alright, so in my case, should I set all the enemy’s parts network owner to nil if it’s an npc? And will that be enough to fix my problem?

Perhaps, also try forcing ragdoll state in a loop

Last resort is to use invisible cancollide parts to overlap the limbs.

I had a similar issue once, disabling some HumanoidStateTypes helped me.

What humanoid state types exactly?

I don’t remember the exact ones but I think all except physics

Whenever you set the “CanCollide” property of the limbs (BasePart instances) of a model which has a Humanoid instance to true/false they will always revert back to what they were before, you can combat this by setting the property inside of a Heartbeat/Stepped event loop.

I wasn’t using base part instances, I was using physics service collision groups

I’ve had this bug before too. usually experimenting with humanoid states and changing them to see which one works helps

1 Like

What humanoid state did help you with this?

not to sure. however it had to do something to do with dead, or falling.

I’m testing with the dummy at the moment and even after setting the network owner to the server, after dropping the dummy, it starts to glitch again: Ragdoll3

the best way for now that i know is to make invis parts with colision and weld it to the hands, legs ect. Because i tried to use humanoid states and it never worked for me.

U can use PhysicsService to make limbs can collide with every other part except them selfs

So i was looking how to make own ragdoll and the hardest parts was colisions, cuz they makes flings and pretty hard, but i found the easiest way. So basically you make local script that will change humanoid states, first you make physic state to make good colision, but if you will try to make humanoid state into getup after that it will get flinged. So after physics state when you want to make character get up you make its state ragdoll for 0.1 second thats has worse colision but dont make flings and it will not be visible, cuz it will be only for 0.1 seconds and after waiting this 0.1 seconds you need to make state get up and all. Thats all with colision part. Also here video of this ragdoll


If you have any question ask me!

Okay. I got your idea. I’ve found my way of getting up from ragdoll - you fire a random player’s main client script and it changes the npc’s state to get up. Works perfectly. I’ve got some questions about the ragdoll: 1. Even on your video, the lag of ragdolled limbs is noticeable, I’d like to know how to prevent it, maybe that’s because you set the limbs’ network owner to nil. 2. I have troubles with arms in ragdoll state. For some reason, they are almost freezed, instead of rotating. What properties do you use for your sockets?
P.S: Nice looking game by the way.

you can client side whole ragdoll and it will work really smooth, just i dont use it, cuz this ragdoll is enough for me. About second you need to make ragdoll state only for 0.1 second not more esle it will look pretty bad and settings that i use here:

			local B = Instance.new("BallSocketConstraint")
			B.Attachment0 = A0
			B.Attachment1 = A1
			B.Parent = Joint.Part0
			B.LimitsEnabled = true
			B.TwistLimitsEnabled = true
			Joint.Enabled = false

I set the NetworkOwnership of limbs to nil and it worked in my game. Maybe you should try it either.

1 Like
		Humanoid:ChangeState(Enum.HumanoidStateType.None)
		Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp,true)

in a localscript.

1 Like