Yeah it can be difficult to understand on its own, I guess the language barrier isn’t helping.
What do you mean by scale doesn’t work with this? Setting the Scale values of the object of the ImageLabel we are resizing will not work as it is being overwritten by the script (which is using Offset).
I will make some pictures explaining the solution.
I have a bar like this:
100%
50%
I have these objects.
I could make the Scale size of Image to {1, 0}, {1, 0}
(so that it fills the bar) like in the 100% picture. But this is a problem! Because when Clip is resized, Image will also resize so that it is smaller:
50% again, notice how the colours are different from the first 50% picture
So we can’t use Scale to make Image be the same size as Back. Instead, we need to use Offset. Which is where your problem happens:
In that video, the size of Image never changes. It is always {0, 255}, {0, 25}
. So we need to use a script to change the size, copying what the Scale property does.
We can do this using the AbsoluteSize property. GuiBase2d | Roblox Creator Documentation
Here’s the code to do this without comments so it may be a little easier to understand without lots of English:
Background:GetPropertyChangedSignal("AbsoluteSize"):Connect(function()
local absoluteSize = Background.AbsoluteSize
ImageLabel.Size = UDim2.new(0, absoluteSize.X, 0, absoluteSize.Y)
end)
(Also go check my first reply, I edited it because it wasn’t good.)