Im currently making an escape for brainrots type game to build my developing experience. Instead of spawning in waves, i spawn in a row of a specific vehicle models that go towards the spawn and then gets destroyed when it reaches it. I have made these models myself in studio.
Every row is grouped as one model (there are 16 vehicle models alltogether in this). Every vehicle model has four wheel models inside (with 3 mesh parts in each), one union (which is the whole vehicle), and one plate part with surfaceGui and textlabel inside.
When i use my spawn script with this row model, the game gets more laggy, but it works fine if i just use a long block instead - so im guessing it's too many parts or something like that, even tho i've tried making the models have as few parts as possible. I'd just like advice on how i can make it not lag. Can it have to do with my scripts or do i just have to have models with even less parts?
I'll leave a picture of my spawning function and the function that moves the models (i can show more of my script if needed). All help is appreciated.
** You are now Level 1! **