hello, im trying to make a npc walk backwards or the opposite way whenever he gets too close to u but ye it works but sometimes he does it sideways (im stupid pls helpa)
I think this should always move them away from the player:
local scaler = 2
local movebackvector = (hrp.Position - ohrp.Position).Unit * scaler
hum:MoveTo(CFrame.new(hrp.Position + movebackvector))
You can change the scaler to change the direction amount.
Now i always get the Vector math confused (someone help :D) on which should be subbed first. But if that pushes them forward the movebackvector should be
local movebackvector = (ohrp.Position - hrp.Position).Unit * scaler