function Round(n, decimals)
decimals = decimals or 0
return math.floor(n * 10^decimals) / 10^decimals
end
local last_time = 0
local debounce = true
local BeginRace = game.Workspace.Start.BeginRace
local EndRace = game.Workspace.Finish.EndRace
local TextLabel = script.Parent.TextLabel
while true do
if BeginRace.Disabled and debounce then
debounce = false
local timer_status = true
local timeStart = tick()
while timer_status do
local raceTimeResult = tick() - timeStart
raceTimeResult = Round(raceTimeResult, 2)
last_time = raceTimeResult
TextLabel.Text = "Time:"..tostring(last_time)
if EndRace.Disabled then
timer_status = false
wait(5)
debounce = true
break
end
wait()
end
end
wait()
end