How do I make meshes load faster?

Hello,
So, I’m needing to make a system where the train is “driving” however, instead of moving the train, I’m moving the subway tunnels and spawning them in front to give the illusion of the train driving.

Recently, ran into an issue where the meshes seem to load too slow and become transparent 8 times out of 10.
This issue seems to not be happening when in Server view.

Streamable Showcase Video

This issue occurs in studio AND in-game.

Additional question
  • Would replacing meshes with parts fix the issue?

I have tried :PreloadAsync() as a loading screen for the player, however it still seems to not help.

If anyone has an idea to fix this or have a potential workaround, please give a reply. (P.S. This issues included Unions too)

Any help is appreciated.

Thanks.

1 Like

Don’t instantiate - reuse instead.

Specifically, don’t spawn a new copy (and despawn an out-of-view copy) of the tunnel mesh everytime the train reaches the end of one.

Spawn 2 or more of those meshes ahead of time, and anytime a tunnel mesh reaches beyond the view of the player, simply shift it back to the front.

Another tip is to clone an existing copy of the mesh, rather than creating a new blank mesh and assigning the mesh ID to it.

That being said, that tunnel looks like something you can build entirely out of parts. Consider using parts instead of a mesh for your tunnel.

2 Likes

Will give it a shot, if it works well I’ll mark it as solution. Thanks!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.