Help with Smart NPCs

Hello Everyone! So, I am making a game about real life, and I need to make NPCs that would be not just walking in the loop, but doing something. I already made NPCs that just walk in the city. But, I don’t know how to make Smart NPCs, that does something. For example, I have a supermarket, and I want to make workers that walk and for example take crates with food and put them on the floor, something like that.

What solutions have you tried so far? I tried to find it on DevForum, but I didn’t see anything that I need. And, I tried to use PathfindingService and Humanoid:MoveTo(), but It’s just for moving.

If someone helps me, It would be really appreciated! Thanks.

1 Like

Sounds like a timeConsuming task.
You would need tables of functions per “profession/citizen”. Each NPC in the game should have its own “Tag”, like “GroceryWorker”, and based on that you would need a table of functions that a “GroceryWorker” is allowed to do.

Each function inside that “GroceryWorker” table should be specific, like going Walking to certaint points (preDefined with tags or in a table) and each function should be customized to perform specific tasks, like taking a create, and do something with it.

Using Modules, custom functions per “citizen type”, and OOP could help.
You won’t find an easy “thing” to do in DevForum, you should write all those functions.

3 Likes

Yeah, It’s a great idea. I already know how I can make it, I’ll try it. Thanks for Helping!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.