Justice, the awesome NPC system

Seems logical. I should probably file a request to have this topic split now since we did clutter this up quite a bit. :laughing:

1 Like

Build 2

  • Implements FastWait by MaximumADHD / CloneTrooper1019
  • Fixes that pesky network ownership bug

Download it from the main post. Historical builds are available under History.

I took a look through the script and it looks like “CollectionService” has something to do with it. I don’t know what to do with that though.

Would it be possible for them to sit and hold tools? if so I may make a Robot cabin crew system for my airline

I think I need to use tag editor.

I recommend Tag Editor since it’ll make your life a lot easier. You need to tag areas you want the NPCs to walk on as pathfindable. Weird name in retrospect I’ll most likely change it in an upcoming build. But for now, that’s what you need to tag your floors as.

For now, sitting and holding tools isn’t a thing that is supported. I tried to get sitting working earlier but due to the way Roblox does navmeshes it doesn’t work correctly. I’ll see if I can come up with a solution however. For the tools, not sure if that will ever be supported. That’s something you’d have to add yourself in an extension to the script.

1 Like

thanks, it is working now. :slight_smile:

1 Like

Looks great! This can help me learn in scripting npc! I will definently use in my game!

Build 3

  • Logging from the NPC controllers can now be disabled in the configuration
  • The origin point of your NPCs can now be changed
  • NPC generation now yields after each NPC spawned to prevent execution timeout or game hangs

Download it from the main post. Historical builds are available under History .

1 Like

5 fps moment is soon:tm: LOL! im gonna put this to my game!

Build 4

Only a small update because I have been meaning to do it for a while.

  • You can now configure a name generator function in the config.

Download it from the main post. Historical builds are available under History .

1 Like

Build 5

(two builds in one day! wow!)

  • Bugfix where hair is cloned regardless of if it is actually cloneable.
  • Changed the special ‘do not give accessory/hair’ operator from nil to -1.

Download it from the main post. Historical builds are available under History .

1 Like

Looks great! Can’t wait for the R15 release!

I haven’t looked at this yet, but is there a mechanic where only certain NPCs can go to certain areas?

They’ll only enter the areas marked as pathfindable meaning you can restrict/allow access to areas simply by tagging them.

I mean like is there a way to make it so certain NPCs only go to certain pathfindable areas? Like 1 NPC can only go to places on 1/2 of the map, and 1 can only go to places on the other side.

Unfortunately that’s not a feature at the minute, I’ll message Lewis about it so we can get it raised as a Feature Request. Thanks for the suggestion :smiley:

Ya, you wouldn’t want for example citizens walking into the VIP area.

Definitely an interesting suggestion. Now I just have to work out the best way of doing it. Different tags for areas seems to be the best course of action here (and then having certain NPCs be tagged with something else). So, for example:

  • Area A is tagged pathfindable_a or pathfindable[a] (not sure how I want to format it yet)
  • Area B is tagged pathfindable
  • NPC A is tagged pathfinding_a or pathfinding[a]
  • NPC B has no tags

NPC A can walk in Area A and Area B, but NPC B can only walk in Area B.

There seems to be an issue with build 5 (I haven’t tested the other builds yet) There are no errors in output but all the Npcs stand around and do nothing, I’m not a great scripter so I cant figure out what happened however i could just be missing something really dumb…


Images :

Standing around

issue

Output

noerrors

I also tagged the baseplate