Well, this can be achieved in any game. Calling the function ‘MoveTo’ on Humanoid makes the humanoid go to the position; however, it stops before reaching the exact position.
Currently I have a code that tells the Humanoid to walk to a Target and if the distance between the NPC and the Target is less than a certain distance, then he just stops moving and attacks. However; the issue here lies on the NPC never reaching the Target’s position and just stops prior reaching it.
This issue is not caused because of the 8 seconds timeout, neither is anchored.
if (NPCPosition - TargetPosition).Magnitude > Radius then Humanoid:MoveTo(TargetPosition) --> This is useless since the Humanoid literally just doesn't move, it stays there. else print("Attack!") end
I expect the Humanoid to reach the exact position, if possible, in the axis X and Z.
The Humanoid never reaches its goal position. It stays at some “random” studs from it and is tedious since I am expecting it to move in that exact position and stop at the right spot. Sometimes is even 1.5 studs behind the actual position and even if you call MoveTo again it just doesn’t work because the Humanoid decides to not move.
Look at the distance, between the Position passed to MoveTo and HumanoidRootPart’s position:
I just extend the distance checks, but this literally breaks the behavior I want since sometimes the Humanoid does reach its goal position making it an issue if I do this.
Issue Area: Engine
Issue Type: Other
(I tried searching for this issue and nothing related to it showed up; please link me a post if you found it to delete this)