Body Velocity Lag

Hello! The title says it all, and I wanted to see if anyone knows why this is happening. I was doing a knockback test, which makes a script that briefly adds a body velocity to the character then deletes it using debris. When it’s deleted, though; It lags:

https://i.gyazo.com/fd7255d7315923704faac91635273c6e.mp4

Does anyone know how to solve this problem? Thanks!

2 Likes

Have you tried setting the network ownership of the part to the player?

5 Likes

How would I go about doing that? And what would it do? Sorry, I’m a bit new to this concept.

1 Like

Something like that is your problem.

1 Like

Would I set the body velocity network ownership to the player? Or the humanoidrootpart?

The problem is not with the BodyForces, the problem is with the server getting confused as to who the network owner of this part should be, setting the NetworkOwnership wouldn’t be helpful as it will still appear to lag for other players. The best way to go around this would be to replicate the BodyForces of this part or the actual part itself to all clients through remote events, that way you can avoid any appearance of lag.

1 Like

Hi, I still cant get it, can u show me how to do that and where do I need to put that script

part:SetNetworkOwnership(player)