My image loading bar uses a transparent frame with ClipDescendents and a duplicate of the image bar under it. It requires the second bar to be the same size as the first bar, which is only achievable with offset. However, this doesn’t scale across all devices.
is it ok if you could show an image or the hierarchy of the loading bar
Why does Scale not work with your loading bar?
Use scale plugins, or just use scale properties itself. Scale will always place the gui or frame at the same place for all screens.
ImageLabel 1 (Loading bar Background)
|
|— Frame (Transparent, ClipsDescendants)
|
|— ImageLabel 2 (The actual loading bar's progress)
I need the second image label to maintain the same size as the first image label, despite its parent (the frame) being resized.
are you using offset to represent how far the progress is instead of scale?
I’m using offset because the second image label needs to keep the exact same size as the first image label, despite being parented to a frame that’s size keeps changing.
Ah Image labels, yeah those can be quite annoying, i think that you could use scale but you’re gonna have to edit some things to have the image cover the entire canvas
if its parented to a frame that’s size keeps changing then set the second image label’s UDim2 for position to 1,0,1,0
so that it always matches its scale regardless of its pixel size
I don’t want the second image label to stay the same size as its parent though, I want it to stay the same size as the first image label. The frame is being resized only to show/hide parts of the second image label, as it uses ClipsDescendants.
Yes, you can scale your UI across all devices while using offset. You can achieve this by utilizing UIScale, where you have “container” frames that have automatic size, and positioned via scale, and anchor points, while their children are mostly sized, and positioned using offset. Here is an example video that I made:
example.rbxm (4.6 KB)
wait so you want it to be the size of the first image label but not the frame
Yes, that is correct. The frame is only there to limit how much of the second image label is actually seen, through ClipsDescendants.
oh yeahh i forgot about ui constraints, maybe you should try this to see if it helps
ok and its limiting it so it shows the percentage of it being finished loading right
Yes. The first image label is the background for the loading bar, and the second one is the actual progress. The second one is a recoloured version of the first one, and parented to the frame so that when the frame resizes, it shows/hides the image.
maybe you could use a script that gets the first imagelabel’s AbsoluteSize, and sets the second image label’s offset to that
alternatively you can try to use the UIConstraints to figure out a way to maintain the scale
Use a script to determine the offset you want. That is something I have done very often as I really don’t like working with scale