I am working on an AI restaurant game, which involves a lot of NPC customers walking around. This often gets laggy. I already have a script that limits the amount of NPCs that can be in the game, but they often get laggy. Does anyone know of a way to make these less laggy?
I am looking for, possibly, a script that disables animations when the player is far away, or just runs animations on the client. Any ideas?

1 comment
AI’s never get laggy unless your code has memory leaks, inefficiency, or is generally bad. Please update your post with the code provided.