So basically the Red part is the Image that also has this edge on the Right hand side which you should be able to see
The Blue is what should stay/not get clipped out from the image
and lastly the Green is what should get clipped.
Basically my ImageLabel seems not to clip the area out even though that ClipDescendants is enabled:
How could I resolve this, other threads has “resolved” this but I don’t actually see any sort of fix to my issue and doesn’t really show how to do it because they’re mostly unclear to me.
I think since the dark red part is an image label it has a rectangular hitbox, you have to make the hitbox yourself with rotated frames or use another image for the bright red part
ClipDescendants works exclusively on the bounding box of any GuiObject - it doesn’t care about the image itself.
A good alternative is to use UIGradients, where you have 2 colors but you make them “fade across” really quickly. The idea is to make sure the “fade” is unnoticeable, so you get a crisp edge between the colors, which can then be adjusted during runtime to make a good resource bar.
Keep in mind though, that changing colors for a UIGradient during runtime can be expensive.
If performance is a concern, you may want to use UIGradient.Offset to adjust the position of the edge instead.
I also hope the images are (or will be) white, or this idea is not going to work well.