If I wish to disable characters from moving I can do a few different things. The problem is, each has it’s own drawback.
- Setting WalkSpeed and JumpPower to 0. Still allows the client to move the character since they have control. The server won’t question it.
- Anchoring the HumanoidRootPart, same again. The client can still move except the server won’t see this until it unanchors the root part.
- Fixing the humanoids position through a loop. This is fine, if I don’t want physics to act on the character.
So how do I ensure that the server can apply physics to the character without the client having any control whatsoever? Logically, I should be able to use the Ownership API, but for this to work I need to set player.Character to nil and set the ownership to the server. Far from ideal and hacky to say the least. Well, then I can create custom characters… except again, it’s more work than it should be.
If I set the ownership of a character to the server, then the client should not have any control.