How To Scale Viewport Frames

This is a bit of a follow-up with another problem I had earlier with Viewport Frames because as it turns out I might not have any clue what I’m doing.

Some context: I’m making a battle royale game and it will soon have a map system, see the image below for it,


For this I used an AspectRatioConstraint and whenever you do splitscreen it scales the map accordingly,

Although as you can definitely tell, it doesn’t scale to fit the whole UI (The whole UI is the green area)
I know that constraints just lock your UI to be a certain size so I started development of the UI without a constraint and now it just cuts it off or comes up short.

The splitscreen one is pretty horrendous,

So my question is, what am I supposed to do here? Should I be scaling the UI or the contents inside the UI, and if yes to either of those, how do I do that? There are 3 scripts in the ScreenGui, but 2 of them are for enabling/disabling the Gui as the first is inputs and the second is clicks, so they don’t affect anything. This is the first script that handles the whole thing,


(The stuff that’s greened out doesn’t matter as they were for when I was testing it, and they weren’t needed)

Thanks if you do try and help with this!

not sure if you want a square map or not, but if you do want square minimap, (what i do for squares) is set the SizeConstraint in the frame to Relative XX/Relative YY, then set a scale that is the same on the two scales.
however, since it’s a minimap, i do suggest using offsets instead so people with small screens can still play.
Screenshot 2025-04-05 at 10.31.40
for example, if you want a square frame with 0.7 X scale, change it to Relative XX’

oh yeah, if you want to make a splitscreen for two minimaps, simply just double the scale on one axis

Sorry I forgot to mark this as a solution. But thanks! It will look a little wonky if you have a really wide monitor but I can maybe figure something out down the road.

1 Like

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