Parenting a nextbot to a player

Hey there. Now, after I decided I wouldn’t give up on my player bots project, there is one method of pathfinding that seems like it’ll be the easiest to use. However, I don’t really know how to approach it. Now, the method is to:

  1. Parent a nextbot entity that follows a path defined by a variable to the player bot.

  2. Have the player look at/follow the nextbot while it goes through the path.

Simple enough, right? However, I have two problems:

If the nextbot was parented, as far as I know it wouldn’t really follow the path, as it’s position would be around that of the parented entity’s.
If the player follows the nextbot and it isn’t parented, then the nextbot might move too fast and, let’s say, move around a corner into a building which the player hasn’t caught up to yet. In this case, the player would be stuck looking at the nextbot through the building’s wall, not moving at all while the nextbot finishes the path inside the building.

What would be the best way to approach doing this, using the nextbot ent’s Think function and GM:StartCommand serverside?

parentply:GetPos()
parentply:GetPos().x - 100

Of course this isn’t the nextbot’s syntax. You can use think functions, and next move functions, to see if the player is more than x units away etc then get his position. Anyways, there’s a lot of free pet follower source code that you can reverse engineer.