Hello,
I’m currently trying to make an audio player. I have already managed to make the time position label, but I do not know how I would make a time remaining label. I have already tried:
-- song position and song length are defined
local minsPlayed = math.floor(songPosition/60)
local secsPlayed = math.floor(songPosition%60)
local minsFull = math.floor(songLength/60)
local secsFull = math.floor(songLength%60)
timeLeft.Text = "– "..string.format("%02d:%02d", minsFull - minsPlayed, secsFull - secsPlayed)
which just makes the seconds go into negative when they reach 0, even though minutes are still left.