Ragdoll knockback doesn't look smooth on the clients view

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.

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

I know you selected a solution, but you could try doing it manually is what I wanted to say.

local rs = game:GetService("RunService")
local function apply_impulse(assembly, force) -- assembly is char, force is a vector3
  local parts = assembly:GetChildren()
  for i=#parts,1,-1 do if not parts[i]:IsA("BasePart") then table.remove(parts,i) end end
  local times, con = 3,nil
  con = rs.Stepped:Connect(function(time,dt)
    local vel = force/times
    times = times - 1
    for i,v in ipairs(parts) do
      v.Velocity = vel*v:GetMass()
    if times<=0 then con:Disconnect() end
1 Like

Thanks for the help, but unfortunately this has the same hiccup effect, I have done a couple of tests and I the issue stems from how roblox replicates the forces that nteract with my ragdoll constraints, because the server sees it as it should be, but the clients see it with the hiccup.

Source of the problem is how I did the ragdoll, i made a better ragdoll script for all to use:


Im making a fighting game but it uses r15 ragdoll, what changes were made that were essential to limiting lag so I can replicate

1 Like