I am away from my computer, and it is late but I’ll check this out within the next 12 hours.
You may consider using Polaris-Nav, which is going into testing next week. It is a new pathfinder that comes with a controller to follow the generated paths. Here is the server: Polaris-Nav
The goal y is in range [5, 20], meaning that if the baseplate it flat then only some y values are reachable by the pathfinder. If it is too high or below the baseplate then a path will not be found. Set the y value to 2-3 studs above your baseplate.
In addition, the pathParams are not being passed into :CreatePath(). The pathParams also needs to be a dictionary, not an array, like so:
pairs() is being used to iterate over the waypoints instead of ipairs(). While this may work in this case, it depends on the internals creating the waypoints table if pairs actually iterates over the array in order. It is not guaranteed by Lua, thus you should use ipairs() instead which is guaranteed to iterate in order, and only over array keys.
The goal is not anchored, meaning that when it generates above it falls to the baseplate and seems like the goal was on the baseplate all along (probably why you didn’t “catch” the height problem)
goal.Parent and goal.Name are being set multiple times
Destination is only set / used in the while loop, but defined as an upvalue
FindFirstChild is being used to get the Humanoid, but is not being checked for existence
Since you cannot index an instance with the name of a child that does not exist without an error being thrown, FindFirstChild was introduced to check if a child exists and if it does, get it. Since it’s presence indicates that what you are looking for may not exist, its result should always be checked to ensure it is not nil.
The fact that it isn’t checked here, but that it exists in your code, tells me that part of your code was copied from elsewhere and it was not fully understood, or understood but effort wasn’t given to ensure correctness. I assumed the first, so brought it to your attention. In general, this is one of the signs of someone who is in the process of learning.
Best wishes on your journey! You seem pretty far along and have a bright mind. I have no doubt you’ll figure it all out and become a great scripter.