Controlling other character's physics from the client?

I’m currently working on a custom character replication system and I want to be able to control the physics of other player’s characters in the game from the client locally.

Currently, the server anchors the HumanoidRootParts of all of the players in the game to disable the built-in system for replicating character positions, and the client then unanchors the HumanoidRootParts.

If I was the client and I were to attempt to, for example, call Humanoid:MoveTo(Vector3.new(20, 0, 0)) on another player’s character, they wouldn’t move as I don’t have network ownership over their character. Is there any way I could circumvent that and move them only on my client?

The best way, in my opinion would be to use a gui and change the target’s CFrame to the position you specify through a local script, doing so would result in only you seeing the moved character.

For my use case just changing the CFrame won’t work unfortunately, because I need to be able to make the character jump and walk around.

I’m not sure if :MoveTo() works when the HumanoidRootPart is anchored. That could very well be the issue.

I’m unanchoring the HumanoidRootParts on the client, which let’s you move around your character without it replicating to the server fine. It’s just that I need a way to control the physics of other player’s characters locally, so I can make other players move around only on my client.

But you are trying to use :MoveTo() to move the other players with anchored root parts, yes?

Yes, however as far as the client who I want to call MoveTo is concerned the HumanoidRootPart is unanchored.

In that case have you tried just setting the NetworkOwnership?

This would solve the problem, but network ownership can’t be set from the client, and setting it from the server would take control away from the actual owner of the character.

Doing local client manipulation of things owned on the server is only possible if those properties are not also being updated from the server.

So if I have your use case right it sounds like a cutscene?

  1. you want all players to have ownership of their own humanoids
  2. you want some players to (under certain circumstances) make local only changes to someone elses humanoid and animate them etc.

Then you’re going to have to clone the cutscene humanoid locally for that.

1 Like

This is sounds like it could be a solution. My only worry is that if the character was to be re scaled, have limbs removed, etc. then it’ll be out of sync.

I think I’ll opt for positioning the real character to an invisible locally created clone that can be animated, moved around etc. and then if any changes to scaling occur then I’ll update the clone to reflect those changes.

Sounds good! Does character scaling/limb changing happen a lot in your project? :smiley: Sounds interesting!

1 Like

Not sure yet, but if I end up using it (most likely will) then I wanna make sure it won’t start breaking things lol.

Thanks!