So i have a timer bar that i want to scale down as the timer value decreases but i have no idea on how to do it properly. I’ve tried many times but it always end up failing (timer just decides to start scaling the bar the last 10 seconds, doesn’t scale it at all, or it scales it weirdly)
Just a basic script to test it:
local TimerValue = 30
while wait(1) do
TimerValue = TimerValue - 1
script.Parent.Size = UDim2.new()
end

I want the Bar frame scale inwards as the TimerValue decreases.

I know how to change the scale that but I don’t know what calculations I have to do to get the new size of the bar. Some help would be appreciated.