Train lags entire game when spawned

Hi. I made a train spawning system and when I load the train it lags for a long time then it stops. Even when driving the train it lags in the game then it stops, the train has alot of unions.

What principle is your train based on?

Use MicroProfiller to find out what kind of operations cause the game to lag.

Where do I find that?
in roblox studio

Esc → Settings → Micro Profiller
or
F9 → Micro Profiller → Client

It’s only useful in a game run on Roblox Client though, not in the Studio.