So below I have a script that creates a progress bar that increases at a speed by doing distance/Time. I also have a countdown timer aswell in a different script. One thing I noticed is that when I change to any other value, the bar is less accurate and is not synced with the countdown.
I am asking how I can make it accurate because I want to divide the numbers so it is a much smoother increase yet stay in sync with the timer. How can I fix this?
increase = 0
divide = 1
distance = 800
Time = 30
repeat
wait(1/divide)
increase = increase + (distance/Time)/divide
script.Parent.Size = UDim2.new(0,increase,0,600)
until increase >= distance - 10

1 comment
Thanks, I just reached 100 rep :)