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!
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.
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’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.
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
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: