Changing Velocity on the Server Not Working

I’m making a double jump script, and I got it to work but I was doing the jumping part on the client, and I want to do it on the server.
This is what I’m using for the jumping part:

local Velocity = HRP.Velocity
HRP.Velocity = Vector3.new(Velocity.x, jumpForce, Velocity.z)	

Now this works on the client, but on the server it like stops them and is a completely different result compared to the client. Why is this happening?

1 Like

you could also just use Humanoid:ChangeState(Enum.HumanoidStateType.Jumping) if Velocity doesn’t give you what you wanted

i don’t speak english very well, sorry

1 Like

I saw examples of using the humanoid state but I’d prefer to stick with Velocity since I can change the max jumps and jump force easier, but I’ll give it a shot.

HumanoidRootPart would be physically owned by the client, so I would guess your problem is related to that. I would just delegate this to a LocalScript. You could still have the server trigger it though. Just use a RemoteEvent or something. Could even just use a BoolValue.

1 Like

That probably is the problem here. Also, I ended up just telling the client to change their velocity from the server, thanks!

1 Like