How to simultaneously mirror positions?

Hey guys,
I got an idea for a game, but at this stage I just cannot put the idea into practice.
In the game I would like to operate TWO characters at once, Humanoid A (the main one) and B, (the mirroring). If A goes left, the B goes right, and the other way round. If while walking one of humanoids stops because of the obstruction like a wall, the other character suppose to continue walking.
The following commands within

RunService.RenderStepped:Connect(function()

are slow, so the two walk at different speed…

humanoid_A:MoveTo(RootPartPosition_A)
humanoid_A.MoveToFinished:Wait()

Any ideas? Thanks.

2 Likes

Maybe instead of using :MoveTo, you would just use :Move() in the direction humanoid B is moving in like so:

--make humanoid A move in the same direction as humanoid B
humanoid_A:Move(humanoid_B.MoveDirection)
2 Likes

Hotter… Thank you very much for the hint!
I read Vector3, inverse it by axis X and make the other character move… But Humanoid_B starts moving SO LATE as supposed to… Please see the video.

When a level is loaded function move_the_friend which is called via RunService.RenderStepped:Connect(function() just does not work for the first 20-22 seconds… and then the other humanoid starts to move a little bit as if he woke up… but stops accidentally… Only after the 50th second the other character starts moving the desired way (it is after about 3000+ cycles of RenderStepped) . No animation though, yet. But here is a question: why it takes time for the other humanoid to “wake up”? …
robloxapp-20201022-2220084.wmv (6.5 MB)

Cool game you got there.

Anyways, I believe the issue is lag or network ownership or something else within the function that I can’t see.

So I have a question is the script located within the server or the client? To get the best responsiveness try using a local script and use network ownership to give the NPC to the player.

Be mindful of exploiters though, use those server-side sanity checks to check the logic of the movement

BTW, please upload your video onto imgur or youtube so it’s easier for others to see.

2 Likes

YEY! The problem is fixed!! Thank you so much!! When a side_model is added to a Work_space, I apply :SetNetworkOwner(The_Player)

I just got back to this project again :slight_smile: Now I would like side B to WALK, animation for some reason does not work, though in the model it is properly cloned.
To be more specific and to revise the topic, here I put the question simple:

How to make a model WALK (animation) during move() command (NOT moveTO() )?