I utilized the Roblox Pathfinding Service to be able to do this, I am also planning to do a fully NPC which will be moving in random directions in a specific area.
I wanted some feedback on how I can improve pathfinding when say I have stairs or other more complex blockades, is their other services I can utilize or will I have to make my own?
At this point, your own AI system will need to be developed.
My AI use 5-point split Raycasting to determine efficient spots, while other developers use neural networks.
Currently I have it on set pathways, I then did generating random Vector3 coordinates by using Math.Random in a specific area. Though what was happening for me was that I was already overloading the server.
Since the script was trying to create pathways before it finished a pathway. Now I can create a wait function but the problem is I don’t consistently know the time it takes to get from one spot to another.
Doing this can be a very easy way to turn even the best server into jello.
I would recommend using basic raycasts and other methods to detect it’s enviroment, so you don’t have to constantly use PathfindingService. Pathfinding should be done sparingly.
You can detect time passed with tick().
local start = tick()
-- something happens
local timePassed = tick() - start