I’m trying to make a Gui that has a list of all the cars you can spawn in the game. However, I’m trying to figure out how you can preview them all without causing too much lag.
The first thing I tried and worked for a long time was just a bunch of ImageButtons with pictures of the cars I uploaded to Roblox. The problem I have with it is they’re lower quality; kinda of fuzzy.
The more recent thing I’ve tried is ViewportFrames. But since there’s 79 cars in the game, 79 models in individual ViewportFrames can add up pretty quickly and cause lag and long load times; the trade off being they look better.
So what I’m asking is: Is there another way that’s a good marriage between the two? The quicker load times of ImageButtons and Roblox assets, with the higher quality of ViewportFrames.
Perhaps images that turn into ViewportFrames when you hover over them, so you only ever have 1 ViewportFrame at a time.
How much lag are we talking here? There shouldn’t be much if the ViewportFrame contents are anchored and not moving, and the cameras are kept still too.
All of the parts are anchored and the Camera isn’t moving. Maybe it’s placebo effect just from being worried about causing lag updating to ViewportFrames from ImageButtons. Do ViewportFrames really not have issues when all the parts are anchored and the camera isn’t moving?
I mean, they take up more memory of course, and you might have a delay if you are setting them all up every time the GUI loads, but once created and not moving, I don’t think 79 should cause a problem.
To get reduce the lag spikes whilst creating, you can have these made in advance on the server in studio already in the GUI.