Ragdoll physics acting weird when player is near

So I have some scripts that ragdoll a character and then launches them a bit until they fall to the ground. It works 100% as it should when it’s on my actual character. However, when I put it on the model, it works around 90% of the time. The 10% of the time looks like this. The only time I really see this happen is when my pc is lagging a bit more than normal. I can provide code in the responses if requested, but it is very messy and this post is more just about finding out which area the problem is most likely in. The script parts include: event handler stuff (this most likely isn’t part of the issue), the script that attaches the trails (this probably isn’t the issue), the part of the script that creates the temporary body velocity, and the part that does the actual ragdolling. I’m only having issues when the model ragdolls and launched but not when a normal player does it. Sorry that this post is messy, I’m still not good at making these yet.

1 Like

Hmm, sounds like the lag is affecting this.

I believe somehow the lag is causing the force is to be not that temporary.

Otherwise, it might just be because of how humanoids work. Humanoids tend to exert force in weird ways to attempt to stand up depending on the humanoid state type. Like this flinging glitch for this other ragdoll problem.

Humanoids do be weird.

Edit: Hmm, considering this

Then I believe network ownership can also play a factor here as the player can somehow own the network ownership of the dummy messing up server interactions, while network ownership of other players belongs to the other players respectively.

1 Like

It turned out the problem was network ownership! For everyone else who’s looking at this post, setting the humanoidrootpart ownership to server completely fixed it for me. And it turns out it was distance, not lag that was causing it to act weird (the client would take ownership and the physics get weird). Here’s the code for anyone looking for a straightforward answer:

hroot:SetNetworkOwner(nil)
5 Likes