Body Velocity does not work on client

Hi, I am trying to make a ball that you can move around with the arrows. I am using body velocity to move the ball, but I have found some unexpected behavior. When I change the body velocity on the server, the ball moves with no problem. Here is what it looks like. -

Unforunately, when I change it via a local script I experience some odd behavior. Most of the time the ball will not move at all, while other times it will move a little and then stop.

Here is the code:

local UserInputService = game:GetService("UserInputService")

local myBall = game.Workspace.Ball

	if input.KeyCode == Enum.KeyCode.W then
		myBall.BodyVelocity.Velocity =,0,0)

I don’t want to have to fire a lot of remote events and handle it all on the server, so what can I do to fix this?

Well, I suppose you would have to set the network ownership of the part to the player via a server script to have full control of its physics. Simply do game.Workspace.Ball:SetNetworkOwner(player) . You would obviously get the player parameter from a playeradded function, in case you were wondering…

1 Like