How would I make a reveal gui?

Basically, I want to make a certain UI aspect review like a mask but use scale to make sure it scales the same on all devices.

The current explorer tab, using the frame “Name” as a “mask” with clipsdescendants on where the TextLabel “Name”. The frame is being resized instead of the textlabel to mask it.
oof

As you can see below here, when the TextLabel has textscaled on with scale, it overtops on and doesnt mask it which is not what I want it to do but it does scale on multiple resolutions. (Used scale)
2memes

You can see here that it does infact mask and doesnt overlap ontop of eachother but doesn’t scale on multiple resolutions. (Used offset)
1memes

Any way I could mask this to make it to where it fits multiple screen resolutions yet still mask and reveal?
(Ik how to tween the frame but don’t know how to mask it if you’re confused)

1 Like

Ah, this issue. It actually has a very simple solution, which works on all occasions where the background is a solid color. If not, refer to Elttob’s reply below.

Solution
The solution is very simple, yet it works. The trick is to simply put a Frame on top of your TextLabel and use it to mask the text. This can be done very easily with the use of AnchorPoint property.

69028dbebde8716f92909b4b36523f3a

This is done using Scale, with the TextScaled Property Turned on. If you don’t understand my words, here’s a place file with the solution.

Frame Masking.rbxl (561.1 KB)

There are probably more solutions out there, but this one is really the most simple to execute. Hope it helps!

3 Likes

If the background isn’t a solid colour, this won’t work. A solution which works in all cases is similar to this answer which I gave for rounded progress bars. Instead of an image label for the progress, it would in this case be a text label with your text in it. The image for the progress bar base is also optional in this case - it can just be an invisible frame that sets the size of the reveal. This will work over any background!

3 Likes

Thank you! Exactly what I was looking for :stuck_out_tongue:

Also thank you @0skarian for trying to help :wink: