Loadingbar with percentage text

Hello. I want to create a loadingbar with percentage text in it. But how to scale my loadingbar the same as the percentage text is. the offset of my bar at 0% is (0, 10) and the finished bar is (0,233)

1 Like

Use scale and not offset. Using offset is your first problem. Using scale it is much easier to calculate the percentage.

And if I switch. How would I calculate it then

Do something like this

for i=1, 100 do
ui.loading.size = UDim2.new(i/100,0,1,0)
task.wait(0.1) -- you can change this
end