LinearVelocity does not replicate

Since BodyVelocity has been deprecated, I’ve decided to try LinearVelocity instead, which is meant as the new alternative.

I’m using it for character punch knockback in my game. When you punch an enemy they get pushed backwards a bit. The problem is that for some reason the client can’t see the knockback happen, but it still happens on the server. So once the knockback runs out, the enemy teleports to their real server location.

This only happens when the enemy’s NetworkOwnership is not you.

1 Like

Set the network owner to the server while they’re getting knocked back.

1 Like

This has been a problem for a long time now, I’ve tried many different methods of setting network ownership and I’ve also tried changing various properties of the linearvelocities. Nothing worked. The knockback would happen on the server but not on the client, then the character teleports to their true location once the knockback ends.

Finally fixed it by just switching back to BodyVelocity for knockback, much more reliable. I’ll admit LinearVelocity has it’s uses since it has way higher levels of precision in terms of direction, but until it can reliably move a character from one point to another on the server without freaking out, it’s not a true replacement to BodyVelocity.

10 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.