What is the best way to make a player move to a point automatically

I am currently working on a tree game and I am trying to make it so when the player swings the axe but is not quite in range it will automatically move the player to the tree and then play the swing animations. But when player automatically moves with

humanoid:MoveTo

the player would get WAY too close to to the tree. Is there a good way to move players to a tree if the trees are randomly placed around the map?

I just don’t know a good way to effectivly get the player to walk toward the tree without getting too close.

(in the video you see the player use the swing animation before they reach the tree, after I finish trying to make the player move the the tree effectively I will change that)

You can try getting the delta vector between the player and the tree, flattening it, adjusting its magnitude, and then adding it to the tree’s position

local TreePos = Vector
local PlayerPos = Vector

local TargetDistance = 5

local Delta = (PlayerPos - TreePos).Unit * TargetDistance
local Goal = Vector3.new(TreePos.X + Delta.X, PlayerPos.Y, TreePos.Z + Delta.Z)

Humanoid:MoveTo(Goal)

This worked alright but do you think this is the best way to make a tree system? should I just use hitboxes instead?