Moving a cloned character to an opposite direction but only in 1 direction

clone.Humanoid:Move(Vector3.new(-plr.Character.Humanoid.MoveDirection.X,plr.Character.Humanoid.MoveDirection.Y, -plr.Character.Humanoid.MoveDirection.Z))

My objective here is to move the cloned character in an opposite direction but only in it’s left and right while the forward direction’s still the same, I’ve tried all the solutions I can currently think of…

I currently have this script so it will move the other direction, but I want it to move in the same front direction, in here it’s moving in an opposite direction both direction.

image
image

1 Like

Maybe try doing:

clone.Humanoid:Move(Vector3.new(
-plr.Character.Humanoid.MoveDirection.X,
plr.Character.Humanoid.MoveDirection.Y,
plr.Character.Humanoid.MoveDirection.Z))

or this:

clone.Humanoid:Move(Vector3.new(
plr.Character.Humanoid.MoveDirection.X,
plr.Character.Humanoid.MoveDirection.Y,
-plr.Character.Humanoid.MoveDirection.Z))

since you don’t want one of the directions to change, which would be the upward facing one (from the view of the drawing) you have to only negate one value

You can use this formula:

instance.CFrame.Position - instance.CFrame.lookVector * X

I need it to work on all angle, so doing the solution the 1st answer and the 2nd answer won’t work…

You can change the angle to the opposite of it, for instance if the angle is 45, change it to -45.
Here’s how you can do that simply:

In positive numbers:

Angle - (Angle * 2)

In negative numbers:

math.abs(Angle)

Solved this as well, used this thing: