Hey, ive been making a timer. But it wont go faster than 32x, cuz wait() = wait(0.03) but i need to make it to go faster, can anyone help?
TimerSpeed.Value = TimerSpeed.Value / 2 -- Speeds up timer
while true do
if Minutes and Seconds and TimerSpeed and Tower and Stages then
local TotalTime = (Minutes.Value * 60) + Seconds.Value
for n = TotalTime, 0, -1 do
TimerTag.Value = string.format("%d:%02d", math.floor(n / 60), n % 60)
Minutes.Value = math.floor(n / 60)
Seconds.Value = n % 60
wait(TimerSpeed.Value) -- heres "wait"
Nowhere does OP mention he’s benchmarking, he’s simply making a countdown that can speed up. We don’t need to have millisecond precision for something like this.
Here is a code to show my solution. This is for a character proxy I wrote to deal with gameplay. This is in an update method which is ran every step like I suggested.
if self.Debounces.HealthRegen <= Clock() and self.Health + .5 <= self.MaxHealth then
self.Health += .5
self.Debounces.StaminaRegen = Clock() + 1
game.ReplicatedStorage.Remotes.Events.Health:FireClient(self.Player, self.Health, self.MaxHealth)
elseif self.Health + .5 >= self.MaxHealth then
self.Health = self.MaxHealth
game.ReplicatedStorage.Remotes.Events.Health:FireClient(self.Player, self.Health, self.MaxHealth)
end