How do I make UI elements sit inside frames and other elements

Hi everyone, I don’t really know how to explain what I want the ui to do, however I do have a screenshot that might be helpful.

In this screenshot, you see how the purple bar looks like its actually in the ui and that’s what I’m hoping to achieve

im so sorry i really don’t know how to describe it, hopefully somebody understands :sob:


you see how the purple bar is like not outside the ui and it crops perfectly, that’s what i want to do with my ui elements

i am NOT good with UI design so i deeply apologise if none of this made sense :sob::sob:

Use the “ClipDescendants” property to make the purple bar rounded to look like it is in the black frame

1 Like

i tried that, it worked at first and now it doesn’t

After a bit I have recreated what you were looking for!


And heres the layout of how it works:

Instead of using a frame to hold all the UI, I used a CanvasGroup, as unlike frames, CanvasGroups will cut out parts of their children even if you use a UICorner.

For Reference, this is without using a CanvasGroup

Other than that there isnt much special, it just uses a TextLabel for text, UICorner for the rounded corners and some frames to make the button!

If you need to analyze it I can send the place file, but other than that, I hope this helps!

3 Likes

Thank you!! Could you send me the rbxm file so I can use it?

I would recommend trying to recreate it on your own, that way you can learn how it works, but I hope this can help point you in the right direction!
TextHolder.rbxl (63.9 KB)