Ruduce lag from moving npc's / parts

How do big tycoon games reduce lag like theam park 2 dosen’t how much lag but 1 game server got over like 400 npcs. I was wondering how they do it as i’m making a tycoon to with much moving npcs. any ideas? Also sorry if this was wrong topic.

They use techniques like removing animations or straight up deleting far-away or out of sight npcs on the client.

when deleting far away npcs do they use ray cast?

im assuming they would just check the distance from the npc’s rootparts position and the camera’s position, and delete anything outside of a maximum distance like 100 studs or so

ye but how do they get it back if they delete it

Streaming.

30 minimum

They get it back from the server.