Calculate the radius between the NPC and the ball and try to have the NPC go as close to the ball as possible in either the z direction or the x direction (whichever one is sideways) since you don’t want the NPC to come out of the goalpost/forward, you just want to move it either left or right.
To move it, you could either do a CFrame animation or a tween animation (I’d recommend CFrame for better physics).