How to fit viewport properly between two frames without showing parts outside of frame borders? (In depth description given)

Hi DevForum,

It’s a small topic, but I was wondering if it was possible to make the parts beyond the frame boundaries of my viewport frame invisible/disappear so it would look good with what I’m trying to do. I tried ZIndex, but obviously it still shows behind and past the frames I have.

Here’s the image I have

Please note that this question is the exact same as this topic asked, however there was no solution exactly posted.

Help would be much appreciated!

Update, I figured it had something to do with UIScaling and ClipDescendants, but I still don’t know how to approach it, as if the frame(s) is rotated, ClipDescendants will be ignored.

If you have not fixed the problem, use CanvasGroups.