Issue
I'm working on a mini fighter. Attacking knocks away the target a certain distance, but sometimes they end up ontop of each other. Movement is automatic(so the game controls both player and AI movement to allow people to focus on comboing(or button mashing if you will).
First idea was just to move the character by walking towards a location, but that isn't exactly ideal because it looks awkward in a fight(turning away from your opponent).
Ideal Solution
Have either player or AI move 'backwards' a certain distance(or magnitude) while facing the other character.
What I have
(Snippet from the code)
local magnitude = (target.Position - torso.Position).magnitude
if magnitude >= 7 then
script.Parent.Humanoid:MoveTo(target.Position, target)
elseif magnitude <= 4 then
-- proposed code
else
script.Parent.Humanoid:MoveTo(torso.Position, torso)
end
(TLDR - Moves until they reach a certain distance, otherwise moves if they're too close, and otherwise stands still.)
Is there any way to make a character walk 'backwards'?

1 comment
Damn you stole my answer.