Seconds to MS (minutes, seconds)

How about minutes and seconds

I want to know all so i dont have to ask again

What do you mean???
(Chars)

bro legit do:

seconds / 60 (seconds to minutes)

minutes * 60 (minutes to seconds)

It would really be helpful to have an example of some of the things you’re trying to do so people will know how to help.

What is he even trying to say?

1 Like

That’s exactly what I’m asking lol

It’s in the title. It’s really not that hard to understand what hes trying to ask for.

One of my old conversion functions, I think this is what you want?

local function convertToMS(Seconds)
	local function Format(Int)
		return string.format("%02i", Int)
	end

	local Minutes = (Seconds - Seconds%60)/60
	Seconds = Seconds - Minutes*60
	local Hours = (Minutes - Minutes%60)/60
	Minutes = Minutes - Hours*60
	return Format(Minutes)..":"..Format(Seconds)
end

seconds to minute:second

--~compile lua 
function i(str)
  local stuf = ""
  local e = str:split(":")
  for i, v in next, e do 
    stuf = stuf .. ((#v == 2) and v or ("0%s"):format(v)) .. ":"
  end
  return stuf
end
function ms(sexs)
  return i(("%s:%s"):format(math.floor(secs/60), math.min(secs%60))):sub(0, 5)
end
print(ms(69)) 
-- didnt get to test the code since i cant open roblox studio :smiel:
local s = 300
print(math.floor(s/60).."m "..s%60.."s")