Smooth Pathfinding Chase

:brain: SmoothChase - Pathfinding AI Module for Roblox

GitHub Repository

SmoothChase is a lightweight, modular pathfinding system built for Roblox using LuaU.
It’s mainly designed for chasing scenarios, where NPCs need to pursue a moving target (like a player),
but it can also be adapted for more general movement or patrolling behaviors.

:star2: Features

  • :white_check_mark: Smooth and natural movement using optimized PathfindingService
  • :white_check_mark: Automatically adjusts update rates based on distance
  • :white_check_mark: Supports different target types: Vector3, Part, or CFrame
  • :white_check_mark: Async movement system with intelligent jump handling
  • :white_check_mark: Simple, data-oriented design to support many NPCs simultaneously

:rocket: Perfect For

  • Enemy AI in combat games
  • Security bots in stealth games
  • Pets following players
  • Any roaming or chasing NPCs

:open_file_folder: Get Started

Just clone the module and drop it into ServerScriptService.
You’ll find full documentation in the README:
:pushpin: https://github.com/wBrowsqq/SmoothChase


If you want performance, flexibility, and simplicity in your Roblox AI systems, give SmoothChase a try!
ATTENTION: The system isn’t perfect and was designed to be flexible so feel free to modify or extend it however you need.

40 Likes

This looks awesome just a quick question though does this fix the whole jittery movement thing? Because when I get a NPC to chase me with pathfinding originally the NPC movements would be jittery and slow.

Yeah, I fixed that issue! NPC movement is now much smoother and more responsive so no more jittery or delayed pathfinding haha. You can also tweak the smoothness level directly in the script (though keep in mind it may use more processing)

1 Like

Can you create a demo place that is editable, and also perhaps some example NPCs that do different things?

like attack with a melee , gun… also can they have different behaviors , like attack and then run away, or attack nearest player, then run away and find a different one…

1 Like

The logic you’re describing (like attacking with melee, guns, running away, or choosing targets) is completely up to you. The SmoothChase is just the pathfinding foundation. It focuses on smooth and efficient chasing behavior using a data-oriented system to support many NPCs at once.
Think of SmoothChase as the movement brain that what the NPC does after reaching the player (attack, retreat, switch targets, etc.) is something you’ll need to script on top of it.
That said, it’s built to be flexible, so you can absolutely implement those behaviors easily by reacting to path completion or manually updating the Target.
If there’s demand, I might provide some basic examples, but the core system is meant to be modular and lightweight for performance reasons.

So if I understand this correctly you need to make a separate script for NPCs to add Abilities etc?

Exactly, the SmoothChase just handle the pathfinding

sounds like there is a demand, or desire, to see how something simple as an
attack whacking a sword… would be nice…

Maybe make use of your game designer role and design a game that requires you to use your hands for coding instead of complaining, it is nice to see a large part of chasing be on the internet for free

7 Likes

wow bro, is there a YT I can watch to be like you? At least my reply above, related to the topic, and not puffing up your chest like you are a tough guy…

I did, and all i see is that your lazy and asking someone else to do your work, im not trying to be egotistical or whatever either

3 Likes

Followed the github readme exactly, I wouldnt exactly call this Smooth

did you activate the PathfindingUseImprovedSearch on workspace?

Late reply but it seems the ai follows behind the player alot even if they’re way faster (most likely due to roblox physics replication having the root delayed), and it doesn’t seem that much performant over the normal roblox one or similar modules.

What exactly is the plus in using this over other stuff? Dunno just seems the same for me.

It is not focused on performance, just use if you need a precise pathfinding in your game. It is based on thread calls. I didn’t find any module related to real time pathfinding so i decided to make one by myself.
I used it in order to make the NPC’s in this game:

Anyways, if it doesn’t work well for you, don’t use. Sorry for the late response tho, i don’t check my replies much.