Ragdoll knockback doesn't look smooth on the clients view

I made an R6 ragdoll system which is basically BallSocketConstraints placed between the R6 limbs that turn on while turning off the Motor6Ds to start the ragdoll, and vise versa to go off ragdoll. For more details you can check this forum post showcasing it.

So the problem I am having with it is this:


As you can see in the video, the torso disconnects with everything and then snaps back and it’s smooth from there, but that snapping occures on the clients only, so it’s likely a replication issue, what backs that up is that the server sees the ragdoll without snapping:

I know it’s possible to fix this because I’ve seen someone’s ragdoll work smoothly like that, here is the clip, the ragdoll is at 0:06
https://medal.tv/games/roblox-studio/clips/81e6ShtXtqAUM/KNUJyKTV612W?invite=cr-MSx4M1ksMTc4NzkyNzIs

I am open to any suggestions.

1 Like

When a user goes to attack/ragdoll an NPC, add a statement that sets the network owner of the enemy’s root part to the player that’s attacking it.

enemyNPC.PrimaryPart:SetNetworkOwner(attackingPlayer)

That’s quite the big the change, but I can see how that can work, i’ll give it a go and reply to you soon enough. Thanks for the suggestion.

1 Like

I dunno if my suggestion works but it would probably be my first go to solution:
setting up the ragdoll effects on the server while whatever you need is still on the client.

I think this will work in general because the problem is the client is causing the disconnection right?

The client is causing nothing, the ragdoll is already happening in the server, the problem is that the client doesn’t see the change live, it hicups for a split second then behaves normaly (as seen before and after the arrow in the video)

You can also just try to set the network owner to nil initially instead, might work better than what you have currently.

That’s already what’s going on, the server is the one who has ownership of the ragdolls.

On second thought, I won’t do this, it poses many security risks and I can’t guarantee it’ll be smooth since it’s reliant on the client’s internet.

Correction:
The bug happens on all clients, not just the client who triggered the ragdoll.

Have you initially set the network owner of the NPC to nil? Perhaps it delays due to network owner changes(the player can change the networkowner of parts that are near them)

I made sure the network owner of the NPC doesn’t change, it’s always set to nil

So all the clients see the hiccup when 1 player ragdolls an NPC (which is controlled by the server). And the ragdoll is done on the server.
Yeah I agree that setting the NPC’s network ownership to the client who is attacking and then ragdolling from that client will look the smoothest for all clients. As far as security warrants, I think it’s worth the smoothness over the chance an exploiter manages to take the NPC and move it somewhere else. It’s just useless if an exploiter network owns the NPC after punching it.

It’s very much not “useless” if an exploiter has network over the NPC, they can instantly kill it and all sort of things, and that NPC is just a placeholder, chances are they’ll be fighting another player. And I don’t think it’ll look smooth if the player attacking has network ownership, because what if the player’s internet isn’t stable, now them and the person who they knocked will lag and all sorts of delayed stuff will happen.

1 Like

I might be wrong but I think Network Ownership won’t let them control the Humanoid properties like Health MaxHealth etc. And as far as the issues you described, I don’t think that is as bad as you think it is. The punch from the attacking player making contact with the NPC will look smooth. If there’s this awkward delay in between it won’t look as smooth.

1 Like

I might also be wrong about being able to control those, but I am certain if the client who has network ownership lags, they ragdoll knock will also look laggy.

1 Like

Maybe try stopping the animations of the NPC when you ragdoll it.

That’s good thinking, but unfortunately it didn’t work, I already tried that.
What seems to work now is that I switched from using :ApplyImpulse to using a VectorForce on the hrp, and it’s much smoother.

You can still see the hiccup, but it’s not as severe.

quick question are you doing it on the HumanoidRootPart or the Torso?

The HumanoidRootPart, but that doesn’t matter in my case because they are both welded together on ragdoll so that when the player stands up, their hrp is in the correct position.

I went from using :ApplyImpulse to using a VectorForce on the HumanoidRootPart and that seems to make it smoother, only drawback is that the knockback isn’t as instant, it’s a tiny bit delayed because the VectorForce applies force over time, not instantly like ApplyImpulse does.

1 Like