Making a tabs inspired game, how to prevent lag when too many troops?

So im working on a tabs inspired game with troop spawning and stuff. When theres too many troops the troops start to moonwalk and it’s very annoying and im not sure how to fix. I used the roblox zombie model AI for the troops because I have no idea where to start with AI buts thats out of context. Any ideas on how to prevent the lag?

1 Like

Well, I tried playing TABS with something like 100 troops and my Game was lagging very much (I was on XBox tho)
Best things I can tell you is to maintain all of them trough one script

2 Likes

Not sure how to do that however I noticed i can maintain one of the server scripts inside the soldier with 1 script which I will try later. Ive noticed TDS uses a lot of troops at once in a small area and it rarely causes a lot of lag :confused:

1 Like

You would use CollectionService to do that, basically you add tags to troops, there’s a Server script that has the AI and will be the AI for all of the troops

2 Likes

Yes I know how to use it ill try it thanks

2 Likes