Ever wanted to make an NPC that follows you around? Neither did I, but here we go!
This script is customizable, with options such as:
-animateNPC -- Set to true to automatically animate the NPC (works with both R6 and R15!)
-printNotifications -- Set to false if you don't want this script to print anything in the output!
-stopNearPlayer -- Stops if closer than 3 studs of the target!
-requiresSight -- In order for the NPC to go towards the target, it needs to see it first (also automatically reduces maxDistance!)
-moveIfNoPath -- Set to true to move 15 studs away if path.Status is not Success (might break movement if npc can't get to target!)
-moveToWait -- Set to false if you don't want to wait for the MoveTo function to finish everytime (smoother npc movement but broken pathfinding!)
-waitBeforeStart -- Wait 5-10 seconds before starting the AI (might prevent some start lag!)
and NPC customization options such as:
-Health
-Jump Power
-Walk Speed
How do I make it work?
Take the script and insert it into any character (Script supports both R6 & R15!)
Please make sure that the character is NOT ANCHORED!
If you want to auto-animate the NPC, set animateNPC to true, like this:
local animateNPC = true -- wow animations
Customize the settings to your liking (pls don’t change anything else) and enjoy the script!
(I’ve made this because I’ve seen a lot of people are having issues with pathfinding so I hope this helps!)
FAQ
You say you updated the script, but I still have the old version?
To fix this, simply go to the model, click the three dots in the corner, click Delete from inventory and then re-purchase the model, after that, go in your game and insert the script again!
Update Log V1.01:
Added stopNearPlayer, moveIfNoPath, waitBeforeStart, requiresSight and createWaypointParts settings;
Significantly optimised the script by cleaning up threads & more;
Bug fixes.
Check this post frequently to see exciting new updates to the script!
I’ve just updated the script with the newest version (1.01), it has tons of new optimisations, detailed info about what almost every line of code does and tons of new settings for you to enjoy!
Yes it works, the difference is that SimplePath is a module, while this is a script that you insert in any NPC that makes it follow players around. And to answer your other question, no, this was made as an easy to use script for people just needing something like this fast
oh mb then, would be awesome if you create a pathfinding module, since simple path isn’t using the new features that got added and lacks so many features
I’d love to but sadly don’t have the time and energy to look into the new stuff and turn everything into a neat little module, definitely adding this as a future possible mini side project tho lol
for a maze ai, i’m struggling to find a pathfinding ai, i tried following roblox’s pathfinding tutorial but it has many flaws, i’m trying to make an ai for a horror maze and safezone&chase system like Cheese escape’s ai Cheese Escape [Horror] - Roblox