Disable player controls SERVER-side?

I need to disable player control on the server. It’s for kind of an important reason and I don’t want exploiters to be able to undo this. The player character will be being controlled by the server during this time so I can’t freeze them.

I checked out this thread but that’s only client-sided: How to disable player controls with new PlayerScript layout?

If that’s the only way to accomplish this, fine. I’d just rather not trust the client if at all possible.

1 Like
  • You could insert a BodyVelocity into the Torso with infinite force on all axes so that they can’t move.

  • You could anchor their HumanoidRootPart.

  • To keep them from teleporting, add a function that teleports them back to the set position if they try to move.

2 Likes

Was just about to suggest this above, but can’t they unanchor it client side, and then move since they have network ownership?

1 Like

I probably should include in the OP that I’m moving the players on the server, not trying to freeze them :slight_smile:

2 Likes

In that case, try tweening the model along a set point of coordinates.

How this would work is you tween the model via a second dummy value (CFrame or Vector3 value). Just tween the value, and then call Model:SetPrimaryPartCFrame() with the dummy value.

More info on how to do this here

1 Like

Eh that’s going to be way too inefficient and hard to implement in a way that looks good for me. I’ll probably just do it on the client and do sanity checks on the server.

Thanks for the help

I don’t think you can, nor should you. The closest I know to overriding player control is through DevComputerMovementMode. That being said, an exploiter could still override it by flipping the mode.

You can’t really disable player controls on the server.

4 Likes