NPC Pathfinding Error

When you are creating many objects that share similar properties in your game like NPCs you should normally look towards OOP as your first approach for efficient handling. You should look into some OOP tutorials like this one if you want to learn how to set it up:

Roblox OOP tutorial