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.

18 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)

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…