Bodymovers; what am I doing wrong?
I have this local script inside of starter character scripts which is meant to control a submarine through body movers. The BodyVelocity is parented to a part within the submarine called root part (the white brick is the root part).

The Z velocity in BodyVelocity had changed to 100, however what I don’t understand is why the part wont move?

1 Like

body movers dont replicate to the client

Reading this article I thought players had network ownership over body movers?

Recently network ownership is now only assigned for anchored parts

Even after moving the code to a server script, the model still doesn’t move?

Im confused. Network Ownership can only be assigned on server to Unachored parts, not the opposite. Or am I wrong?
Why changing the network ownership for parts that are not going to move and have physics as achored parts are?

For the code on the server script well make sure the edit the maxforce of the body velocity, not enough force for a heavy submarine with gravity and it’ll of course not move:

MaxForce Determines the limit on how much force that may be applied to each axis

if you want to control it locally give the model to the player using network ownership for each of the base parts through this function:

local function giveModelToPlayer(model, owner)
    local descendants = model:GetDescendants()

    for index, descendant in pairs(descendants) do
        if descendant:IsA("BasePart") then

I’m not sure if you have to set the network ownership of all the parts or just the root part documentation doesn’t seem too clear but yeah for now I’ll just set the network ownership to all the parts.

1 Like

Thanks for the reply, however I only got it moving along the z axis and not the x or y axis?

I think the issue here might be that you’re not giving enough force to the BodyVelocity.
Have you tried increasing the velocity, or ensuring that the MaxForce or Poweron the BodyVelocity is enough to move the entire submarine? (pretend this paragraph is strike-throughed, I don’t know how to do that)

Above paragraph was already answered by the post above, the stuff below is still important though.

If you want to have the submarine always move forwards (which it looks like you’re trying to do with the vector variable), you should do this

SubRootPart.BodyVelocity.Velocity = SubRootPart.CFrame.LookVector * 100

I also wouldn’t recommend having the client have network ownership of the submarine, that’s going to let exploiters teleport anywhere they like.

Whenever W is pressed the model only moves to the right?

Server script

game.ReplicatedStorage.W.OnServerEvent:Connect(function(player, isGoingForward, SubRootPart)
	if isGoingForward then
		SubRootPart.BodyVelocity.MaxForce =^10, 10^10, 10^10)
		SubRootPart.BodyVelocity.Velocity = SubRootPart.CFrame.LookVector * 100		

That means the LookVector for the root part is facing to the right, i.e. the part is rotated 90 degrees. You can either realign the part so the LookVector is facing forwards, or just find which face is facing forwards and use that vector instead (wouldn’t recommend this as its very unintuitive and will make your code unnecessarily confusing)

You can also substitute 10^10 for math.huge (“a value larger than or equal to any other numerical value”), which will make the MaxForce essentially infinite

1 Like

Thanks for the response.
One other question, how could I prevent the model from tilting downwards shown in the video?

It looks like that’s just gravity doing it’s thing. Found a solution here: How can I make a part unaffected by gravity? - #20 by ThatTimothy

You’re going to want to adjust the original BodyVelocity (which moves the sub) and adjust its MaxForce so that it cannot exert any force on the Y axis

SubRootPart.BodyVelocity.MaxForce =, 0, math.huge)

And then create a new BodyVelocity which will keep the submarine’s velocity on the Y axis constantly at 0 (this shouldn’t be touched by the scripts, create this in studio and with these properties)

MaxForce =, math.huge, 0)
Velocity =, 0, 0)
P = 9000 -- maybe change this, might be too much or too little depending on the submarine's weight

Of course, this solution will only work if the submarines are only ever going to move on a flat, 2D plane. If you want to have non-flat terrain for the subs to move around on, you should instead just add barriers around the world border so they can’t fall off.


You are wrong, it is to client and server for only anchored parts

yes, probably Im totally confuse, sorry. I was just saying that ownership can only be set from server, and for Unanchored parts. Probably we are talking about different topics that I dont understand

1 Like

You don’t assign NetworkOwnership to the BodyMovers themselves, you assign NetworkOwnership to the parts that contain the BodyMovers. If a player has NetworkOwnership of a part, the BodyMovers can be changed on the client and the changes will replicate to the server because the client has ownership over the part.

Rule of thumb, if the client has control over a parts physics then handle the physics on the client in your code.


1 Like