Will Client-Side Body Movers Replicate to the Server?

Suppose I have a custom character rig. It has a HumanoidRootPart. Inside that part I have a BodyVelocity that will be used to handle moving the character.

My question is:

If I change this BodyVelocity’s Velocity property FROM THE CLIENT, will the result replicate to the server? That is, will the character move as expected with the correct velocity on the server as well?

If the answer to the question is “No, the BodyVelocity doesn’t replicate to the server”, then what are good methods to work around this?

Thanks.

In short, no. Nothing the client changes, excluding the character and animations etc, is replicated without external help.

Edit: I did not thoroughly read your post before. Yes it will replicate the physics of it, but the server can not directly read from the property, as it would have been set locally. However, as stated above, the client controls their own character, meaning the effects of a BodyVelocity instance would replicate.

1 Like

Yes and no. The velocity property will not replicate itself, however the force that would be applied if you had changed it will work.

Roblox has a system called Network Ownership - this means that, for things like your character, and also nearby unanchored parts, the client does the physics calculations. This means that, yes, setting it locally will work for this one case (but only for where the client who set the velocity locally has network ownership of that part).

For the character, and parts welded to the character, they always have network ownership by default to that player. In other cases, you can find out who owns it by calling BasePart:GetNetworkOwner.

If you want to read up more on how this works, go to this wiki article: Network Ownership

2 Likes

I just realized that I had answered my own question a few months ago…

I created a character Fly script that uses a BodyPosition that changes the character’s HumanoidRootPart’s position, and I manipulated the BodyPosition via a Localscript. To my surprise, the movement replicated.

But your answer is very detailed, thanks. I am still new to the whole concept of Network Ownership, and this really helped.

1 Like