Having this really annoying bug where ragdolls get randomly flinged upon approaching them

I’m making a sandbox game where one of the core features is Ragdolling upon Death, but as soon as i approach a ragdoll which has been thrown far away by an explosion, it randomly gets launched in the opposite direction. I suppose it’s an engine bug, but i would really like to know if there is a way to fix this. Please note that this bug only happens sometimes, it is not common however it is Very Annoying and i would appreciate any help.

Usually when the player approaches its due to a change in network ownership.

Try enabling visualization and setting it to server.

1 Like

The issue is likely due to network ownership, where the client partially controls the ragdoll’s velocity when they get close to it.

To fix this, you can ensure that the server fully controls the ragdoll’s physics. Make sure the server owns the NPC model as soon as it spawns.

I.e

-- NPC spawn
for _, Descendant in NPC:GetDescendants() do
    if Descendant:IsA("BasePart") then
       Descendant:SetNetworkOwner(nil)
    end
end
1 Like