Hey this is pretty cool. I noticed some problems when using {x=0,y=0,z=0} as the starting position though, maybe because the parent of a node in that A* implementation is initialized at (0, 0, 0)?
I have some suggestions for improvement too:
The calculateScore() function uses a heuristic based on the Euclidean distance to the goal, it should be the Manhattan distance for grid-based movement. For example, you could change line 55 from "local s = dx * dx + dy * dy + dz * dz" to "local s = math.abs(dx) + math.abs(dy) + math.abs(dz)". This should help increase efficiency and speed of th