Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstalliTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
To make an AI NPC behave consistently for everyone in a Roblox multiplayer game, run its target selection and pathfinding in a server Script. Give the NPC a Humanoid and HumanoidRootPart, calculate routes with PathfindingService, and move the Humanoid through the route’s waypoints. If the route fails or becomes blocked, handle the failure and compute another path.
Keep consequential decisions—such as whether an attack hits, damage is applied, or a reward is granted—on the server too. A client can request an interaction, but the server must validate it.
Why should the NPC’s AI run on the server?
Roblox uses a client-server model: the server is authoritative for shared game state, and server-created instances and server-side changes replicate to clients. An NPC that chooses targets or navigates differently on individual clients can produce inconsistent behavior. Server-side pathfinding also has a complete view of the world, whereas a client may not have streamed-in objects needed to calculate a route.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesRoblox’s security guidance puts the principle plainly: “The server must be the ultimate source of truth for all simulation states, rules, player progression, and critical decisions.” — Roblox Creator Hub, Security and cheat mitigation tactics.
#1 Best Overall
- Redemption: Online only. Robux cards can only be redeemed in a browser at Roblox.com/redeem. They cannot be redeemed in the Roblox mobile app or any video game console.
- Roblox is an immersive platform for connection and communication. Every day, millions of people come to Roblox to create, play, work, learn, and connect with each other in experiences built by our global community of creators.
- Get more with every Roblox Gift Card! From now on, when you redeem a Roblox gift card, you get up to 25% more Robux. Perfect for gaming, creating, and exploring- more Robux means more possibilities!
- Deck out your avatar and unlock additional perks in your favorite experiences when you use Roblox Gift Cards to purchase Robux (Roblox's virtual currency).
- Each gift card grants a free virtual item upon redemption.
Put a shared controller in ServerScriptService, or put a server Script inside the NPC model when its behavior belongs with that model. Check Studio’s current Script type and RunContext guidance if using an unusual location. Do not use a LocalScript for authoritative decisions just to make the NPC appear smoother; client-side cosmetic animation or interpolation can supplement, but should not replace, replicated server state.
Prepare a rig that can move
Insert or create a character rig in Workspace and confirm it has a live Humanoid and a usable HumanoidRootPart. Position the rig on navigable ground and check that its parts are configured so the Humanoid can move it; anchoring the assembly can prevent movement.
Before adding AI, confirm that the rig can move through a simple test in Studio. A pathfinding script cannot compensate for a missing root part, a disabled or absent Humanoid, or a physical setup that prevents movement.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #2
- The easiest way to add Robux (Roblox’s digital currency) to your account. Use Robux to deck out your avatar and unlock additional perks in your favorite Roblox experiences.
- This is a digital gift card that can only be redeemed for Robux at Roblox.com/redeem. It cannot be redeemed in the Roblox mobile app or any video game console. Please allow up to 5 minutes for your balance to be updated after redeeming.
- Roblox Gift Cards can be redeemed worldwide, perfect for gifting to Roblox fans anywhere in the world.
- From now on, when you redeem a Roblox Gift Card, you get up to 25% more Robux. Perfect for gaming, creating, and exploring- more Robux means more possibilities!
- Every Roblox Gift Card grants a free virtual item upon redemption.
Choose a target on the server
Define which players count as eligible targets and when the NPC should retarget. The server should inspect each player’s current character, confirm it has a usable root position, and check whether the character is alive if that is part of the game’s rules. Set a target range and decide how the NPC responds when a target dies, respawns, or moves out of range.
Use the selected character’s current root position as the destination for navigation. Do not treat a target position supplied by a client as authoritative; clients can send fabricated arguments.
Calculate and follow a path
PathfindingService computes a route, while the Humanoid follows it. Roblox’s Pathfinding guide describes computing paths, moving Humanoids through waypoints, and handling blocked routes.
Rank #3
- The easiest way to add Robux (Roblox’s digital currency) to your account. Use Robux to deck out your avatar and unlock additional perks in your favorite Roblox experiences.
- This is a digital gift card that can only be redeemed for Robux at Roblox.com/redeem. It cannot be redeemed in the Roblox mobile app or any video game console. Please allow up to 5 minutes for your balance to be updated after redeeming.
- Roblox Gift Cards can be redeemed worldwide, perfect for gifting to Roblox fans anywhere in the world.
- From now on, when you redeem a Roblox Gift Card, you get up to 25% more Robux. Perfect for gaming, creating, and exploring- more Robux means more possibilities!
- Every Roblox Gift Card grants a free virtual item upon redemption.
- Create a path: Call
PathfindingService:CreatePath()with agent parameters that approximate the NPC’s dimensions and movement abilities. Incorrect dimensions or capabilities can lead to routes the rig cannot traverse. - Compute the route: Compute from the NPC’s root position to the chosen target’s current position. Check the path status before using its waypoints. If computation fails, handle that state; do not assume a waypoint list exists.
- Move through waypoints: Use Humanoid movement commands to reach each waypoint. Honor waypoint actions, such as a required jump, rather than treating every waypoint as an ordinary walk target.
- Watch for changes: Listen for
Path.Blocked. Recompute if the blocked waypoint affects the portion of the route still ahead, and also consider recomputing when the target has moved enough to make the route stale. - Bound the work: Add bounded waits, failure handling, and a sensible recalculation cadence. Avoid recalculating every frame; there is no single cadence that fits every map, NPC count, or server workload.
Server pathfinding or client pathfinding?
| Choice | What it means | Best fit |
|---|---|---|
| Server computes the path | Navigation uses the server’s world view, and the server controls the route decisions that affect shared behavior. | A shared NPC whose behavior should be consistent for all players; generally the practical default. |
| Client computes the path | The client computes using the world objects currently available to it. Streaming can leave a client without objects that matter to a route. | Not the default for shared NPC navigation; a client’s incomplete world view can cause path failures or divergent behavior. |
The distinction matters under streaming: the Roblox Pathfinding guide notes that a client may lack streamed-out objects and therefore fail to compute a path to them. Keep shared navigation on the server rather than moving it to clients to solve presentation smoothness.
Keep interactions and consequences authoritative
A RemoteEvent transports messages between client and server; it does not make a client’s request trustworthy. Use one only when a client needs to request a discrete interaction or receive presentation-related information. Before changing NPC or game state, validate the request on the server.
- Check the player’s current state and whether the requested action is permitted.
- Check distance to the NPC using server-known positions.
- Validate the argument types and values; do not accept a client-supplied target, hit, or reward as proof.
- Enforce cooldowns or rate limits so requests cannot be spammed.
Keep target selection, hit decisions, damage, loot, and progression changes on the server. See Roblox’s guidance on Remote events and callbacks and security and cheat mitigation.
Rank #4
- The easiest way to add Robux (Roblox’s digital currency) to your account. Use Robux to deck out your avatar and unlock additional perks in your favorite Roblox experiences.
- This is a digital gift card that can only be redeemed for Robux at Roblox.com/redeem. It cannot be redeemed in the Roblox mobile app or any video game console. Please allow up to 5 minutes for your balance to be updated after redeeming.
- Roblox Gift Cards can be redeemed worldwide, perfect for gifting to Roblox fans anywhere in the world.
- From now on, when you redeem a Roblox Gift Card, you get up to 25% more Robux. Perfect for gaming, creating, and exploring- more Robux means more possibilities!
- Every Roblox Gift Card grants a free virtual item upon redemption.
Decide who simulates NPC physics
Server-side AI logic and physics ownership are related but separate choices. Roblox can automatically assign network ownership of unanchored physics assemblies to nearby clients to distribute simulation work. A server script can call SetNetworkOwner(nil) on an eligible assembly to force server ownership, but Roblox warns that doing so can make motion appear jittery to clients. Use that option when the NPC’s physical state needs tighter server control, not reflexively.
Anchored parts remain server-owned, and network ownership calls cannot change that. Choose ownership based on the NPC’s physics needs and the trade-off between distributed physics work, responsiveness, and control. Roblox explains the behavior in its Network ownership guide.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Test multiplayer behavior in Studio
Use a Studio session with a server and multiple clients, rather than relying only on a solo run. Exercise the cases that can expose route and authority problems:
Best Value
- The easiest way to add Robux (Roblox’s digital currency) to your account. Use Robux to deck out your avatar and unlock additional perks in your favorite Roblox experiences.
- This is a digital gift card that can only be redeemed for Robux at Roblox.com/redeem. It cannot be redeemed in the Roblox mobile app or any video game console. Please allow up to 5 minutes for your balance to be updated after redeeming.
- Roblox Gift Cards can be redeemed worldwide, perfect for gifting to Roblox fans anywhere in the world.
- From now on, when you redeem a Roblox Gift Card, you get up to 25% more Robux. Perfect for gaming, creating, and exploring- more Robux means more possibilities!
- Every Roblox Gift Card grants a free virtual item upon redemption.
- Place obstacles in the NPC’s route and confirm it recovers when a path is blocked.
- Test destinations that cannot be reached and verify the script handles failure without indexing missing waypoints.
- Kill or respawn the target and check that the NPC retargets according to its rules.
- If the experience uses streaming, test with streaming enabled and compare what the server and clients can see.
- Use Studio network simulation tools to add latency, then observe NPC movement and server workload.
- Try invalid or repeated interaction requests and confirm the server rejects them.
Roblox’s broader Server authority model covers a larger networking architecture with setup requirements and prediction/rollback concepts. A beginner NPC does not need to enable that model simply to run a server-side Script; check its current status and requirements before adopting it.
Fix common NPC problems
The NPC does not move
- Confirm the model contains a live
HumanoidandHumanoidRootPart. - Check that the rig is not anchored or otherwise physically configured so movement is impossible.
- Verify the controlling code is executing in a server context.
The path status is not successful
- The destination may be unreachable or the start or endpoint may not be on navigable geometry.
- Adjust agent dimensions and movement parameters to better match the rig.
- Handle unsuccessful computation before attempting to read waypoints.
The NPC starts moving, then gets stuck
Check whether Path.Blocked is connected and whether the blocked waypoint is still ahead. Recompute when the obstruction affects the remaining route, and account for a target that has moved enough to invalidate the current path.
It works in solo but not in a server
Inspect script context, replication, network ownership, and assumptions about which machine makes decisions. Reproduce the issue in a Studio session with multiple clients.
Free tools Windows power users keep installed
One-click scans. No signup required.
A path works on one client but fails on another
Streaming may leave clients with different sets of world objects. Compute shared NPC routes on the server, which has the complete world view described in Roblox’s pathfinding guidance.
Players can exploit an interaction
Assume a client can fire a remote with fabricated arguments or at a high rate. Validate the action, distance, player state, and request rate on the server before changing authoritative state.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

