I currently have a ragdoll script that seems to be working, but when I view a player who is currently ragdolled from another client or from server side, the animations appear extremely choppy.
The player seems to only be firing off a ragdoll frame every half second or so, but their general rig/body seems to be moving fine.
I’m not great at explaining, so here’s a video sort of showing the issues I’m facing.
I haven’t touched roblox studio in a while, but this is something I ran into a while ago before I stopped too.
This happened to me before but I just ignored it, there’s a Roblox game which has ragdoll and appears choppy to other players. Anyway, are the constraints created on the client or server?
It’s because the client has network ownership of their own character, and every single limb’s movement needs to be replicated to the server and then to every other connected client.
If you want the physics to look smooth for everyone, you could have every client(except for the client that’s ragdolling) create a ragdoll of that player, and put AlignPosition and AlignOrientation constraints into the cloned ragdoll’s root and have it align its position and orientation with the actual character, only the actual character is set to be transparent on each client, and made visible again once they stop ragdolling. That way, the ragdoll will mimic the movement of the actual character, and you can tweak the AlignPosition and AlignOrientation values so that the movement is smooth, and since all of this work is being done on each player’s computer, no replication is needed and the physics looks smooth.
Obviously, it’s not going to be 100% accurate; limbs won’t have the exact same positions and orientations of the limbs on the actual character, but in theory you should get a smoother look.
This actually worked amazingly well. I assumed that doing this would automatically make every client much laggier, though it makes sense why it doesn’t.
A couple of ragdolls probably won’t cause any lag for the client, but if you have hundreds, yeah probably. Just be sure you’re cleaning them up when you’re done using them.