I have an npc (npc1) that is walking to another npc (npc2). I want the walking npc to walk to the other but stop when it is 5 or 10 studs away. the function I have wont do this and instead the npc tries to walk to the same exact position as the other.
here is the function:
function gototarget(p) script.Parent.GoTo.Value = p.Position,script.Parent.Parent.HumanoidRootPart.Position end
p is a part inside npc2, and the humanoidrootpart is inside npc1. but npc1 wont stop 5 or 10 studs away. it instead goes exactly were npc2 is. what should I do to fix this?