How many viewportframes can you fit in an entire screen

SO I was thinking of making a list of the floors in my elevator game and I have about 70 and each of the floors in the gui will have a viewportframe preview of the floor so each floor as an average of 20-80 parts is it possible to fit that in a viewportframe where there are at least 70 of them and will it lag

Oh and the viewportframes will be in a scrolling frame so is it possibel to make it so that the viewportframes are only active if the player can view it from the scrolling frame

  1. Thats not scripting support.
  2. You can fit as much as viewportframes in an entire screen. ( But it might be laggy. )

Please read
https://devforum.roblox.com/t/about-the-scripting-support-category/45863/2

Before posting thanks.

Ok but how do I make it so that the viewportframes are only active if its visible to the palye’s screen

You could utilize the Camera | Documentation - Roblox Creator Hub function on various points on the viewports (assuming these are in surface GUIs) then take all of the points that are within the player’s screen and test those with Camera | Documentation - Roblox Creator Hub. It’s not perfect but it should help you to determine if it’s visible within their screen.

No I mean make the viewportframes visible within the player’s GUI scrollingframe screen

I might be wrong but I think Roblox already optimizes this. Have you tested anything yet?

Static viewportframes (meaning viewportframes where the contained parts do not update) are stored as textures, so having 70 static viewportframes should be the same performance as having 70 decals.

1 Like

Thanks for the insight!,