Basically I've created a NPC follow script. I want to the NPC to move to any position within 3 studs away. I saw this before but I can't remember what it was.
My line:
Humanoid:MoveTo(Position*Vector3.new(0,0,3)*Units)
My goal is to move the NPC anywhere 3 studs away from that position. I believe it had something to do with units but I can't remember.
Someone please refresh my memory.
Also explain how it works that would help alot.
PS: No one in the discord would help me :c

2 comments
Why not just use the vector magnitude and have it stop when it is less than 3 units away? while (npc.Position - target.Position).Magnitude > 3.0 do wait(someTime) Humanoid:MoveTo(Position) end
P.S. There's also the DistanceFromCharacter function if you don't want to use vector magnitude. https://developer.roblox.com/api-reference/function/Player/DistanceFromCharacter