How to go about learning Pathfinding

Hello, I don’t want to brag, but I’ve learned pretty much everything in Luau over the past couple years.
But, one HUGE problem for me is that I never learned Pathfinding. The documentation on it just doesn’t help, and most videos don’t explain it well either.
I love horror games, I need Pathfinding AI a lot, and I’ve never been able to finish my game because of this…
So, how would I go about learning AI/Pathfinding, and I mean the advanced parts too?

I suggest using a public Pathfinding Module such as SimplePath and building ontop of that. You will slowly learn how pathfinding works and how to modify it. I’ve tried coding my own pathfinding before, but it just really isn’t worth it to set up every single time. You need to create a path, create waypoints for the NPC to follow, make sure to recalculate the path every waypointReached incase the target moved, make sure the WayPoint spacing doesn’t interfere with the Pathfinding speed, figure out how to code jumping properly, aghhh it’s really just too much work.

In the end I just used a pathfinding module, made my own modifications to it (such as using Humanoid:MoveTo() when there is a clear LOS between target and pathfinder).

Now, to go about actually learning pathfinding from scratch… I’m sorry I really just can’t help ya there. What I did was look at preexisting (good) pathfinding scripts. Plus, if you want to make your own A* pathfinding algorithm, there aren’t really any Roblox specific resources. You’ll need to figure out how it works and incorporate it yourself into Roblox Studio.

1 Like

What documentation have you used?
This one seems pretty in-depth: Character Pathfinding | Documentation - Roblox Creator Hub

1 Like