EZ Pathfinding V5

EZ Pathfinding V5

GitHub | Documentation | Source | Model


About

This is the latest and newest EZ Pathfinding module. It incorporates OOP and is much more efficient, pleasing to the eyes, and better performance wise. It even has more functionality than the other modules. And of course, this will be updated frequently in honor of bugs and suggestions.

Setup

In order to use this module, you will need to download the rbxm file or insert a script with the downloaded .lua file. Once the module is inserted into your game, you can require it using require(path.to.module). Now read through the documentation (link at top of post). You are now able to freely use the module.

Information

This module is still in its early stages so I expect there to be bugs. Please report them to me immediately via DMs or the GitHub issues page. Please be patient with me as I will try my best to fix all bugs reported. Refer to the GitHub link for extra information on this module. If you have any questions, just PM me.

33 Likes

Sorry, but why are you creating a new post for this? Just update the original EZ-Pathfinding module. I’ve done the same for all my projects:

You’re clogging the category & losing the views and likes that you had on the previous thread.
If you feel that this module is too different, then adopt the semantic versioning style - MAJOR.MINOR.PATCH.

6 Likes

Actually I had previously thought about this but the older versions didn’t have properly structured GitHub repositories. If I made one post, it wouldn’t make sense for documentation of each version to be scattered everywhere. I know for a fact that most people still are using older versions of the series, and removing the information would hurt those people.

2 Likes

Good day,

I am running the sample server script code on an NPC in the workspace but getting the error below, can you help, please

Do you have an example?

‘’
local mod = require(game.ReplicatedStorage:WaitForChild(“MainModule”))
local path = mod.new(game.Workspace.NPC, Vector3.new(24,0.5,66))
path.Play()

– Error Position is not a valid member of Vector3 - Server - MainModule:156
‘’

Julian

1 Like

You’re trying to computate a path to a BasePart, not a Vector3.

mod.new(game.Workspace.NPC, path.to.part)

– Error Position is not a valid member of Vector3
Position is not a valid member of Vector3 since it is the position.

1 Like

Hi,

Thanks for the help, I still can’t figure out the Vector3 part still says invalid.

wait(5)
local WorkSpace = game:GetService(“Workspace”)
local mod = require(WorkSpace:FindFirstChild(“PathfindingV5”))
local goalPos = workspace.Goal
local npc = script.Parent

local path = mod.new (npc, Vector3.new(goalPos.Position.X,goalPos.Position.Y,goalPos.Position.Y))
path.Move()

1 Like
local path = mod.new (npc, goalPos)
path.Move()

That will do

1 Like

This actually is an error on my behalf. I will be sure to fix it in a near update.

Would it be possible to use this pathfinding module to avoid humanoid collision?
Since more often than not in my game, the collision causes heavy lag.

With pathfinding, it finds a path where it avoids touching specific objects. I suppose you could try it but this module is outdated and hasn’t been updated in a while.

Do you have a newer module? Thanks

No unfortunately this is the latest and final module.

Sorry to bump this, but what would be the most efficient way to continuously check the position of a part and create a new path if the position has changed? I have thought about using the module for a monster ai, which would target players, which are always moving. I have put this into a while loop, but each time it creates a new path it just turns around and runs back and forth.

1 Like

image

line 156

1 Like