Making a server-sided ragdoll as a corpse

I’m a bit confused on how I can get this to work, nothing I’ve tried is yielding good results. When the player dies, I’m trying to make it so their character is preserved and ragdolled on the server for other players to see.

For some reason, their character bunches up every time I try this, unless I delete the humanoid which I don’t want to do. It’s no longer their active character, so I’m not sure what’s going on here.

I also tried locally replicating the corpse, but in order for that to work each client needs reference to the corpse model to use, and I can’t find a way to parameterize that over the remote call. (sending a cloned object reference does not work)

Meanwhile, the server needs to remove the player’s character as they died they shouldn’t be in the game anymore.

Any ideas appreciated, thanks.

If it’s not their active character then is there a problem with deleting the humanoid? Even then, couldn’t you make it so joints don’t break on death and then you allow the humanoid state for ragdolling? The bunching up seems to be an odd issue though, I’m not quite sure what would be causing that. Does it atleast function like a ragdoll should with this or does it just completely ruin it?

1 Like

Changing the character’s humanoid state does nothing. It’s no longer owned by any player, and I set its network owner as nil so the server has control of it entirely.

The torso just kinda freezes in the air, and the limbs freely move, all bunched up. Works fine if it’s controlled by a player, though.

Ah, I see.

I’ve had this issue in the past and honestly never truly figured out how to fix it (since I stopped working on it after this bug and a few others) however you could try deleting the welds and replacing them with another type of hinge. Alternatively, deleting the humanoidRootPart might free the character from being stuck at a certain position.

If you do disable joints staying on death, replacing the joints would be a lot easier. You can then also customize them to stop body clipping, un-normal angles etc.

Hope this helps, I’ll look for a better fix though since this all feels scuffed.

1 Like

Have you checked to see if the Torso parts or HumanoidRootPart is Anchored?

With the limb issue are all the joints going to 0,0,0?

it might be the humaboid state type you should afjust to physics or something i dont remember but it was the humaboid state type that caused problems for me when i was working on temporary ragdoll and then npc ragdoll, not changing it caused limbs to nocollide

2 Likes