#time help
16 messages · Page 1 of 1 (latest)
Sounds fun. Here’s a bit of code I typed up that should work. function Format(Int) return string.format("%02i", Int) end function convertToHMS(Seconds) local Minutes = (Seconds - Seconds%60)/60 Seconds = Seconds - Minutes60 local Hours = (Minutes - Minutes%60)/60 Minutes = Minutes - Hours60 return Format(Hours)..":"..Format(Minutes).."...
who do i add that to my script
i have a round system thingy
local Time = game.ReplicatedStorage.RoundData.Time
--SETTING--
local ITimeBeforeTeleport = 100
local IRoundTime = 100
local RoundTeleport = workspace.RoundTeleport
local RoundFinishedTeleport = workspace.RoundFinishedTeleport
--END--
local TimeBeforeTeleport = ITimeBeforeTeleport
local RoundTime = IRoundTime
Time.Value = ITimeBeforeTeleport
while true do
repeat
wait(1)
Time.Value -= 1
TimeBeforeTeleport -= 1
until TimeBeforeTeleport == 0
TimeBeforeTeleport = ITimeBeforeTeleport
Time.Value = RoundTime
game.ReplicatedStorage.TeleportPlayer:Fire(RoundTeleport)
repeat
wait(1)
Time.Value -= 1
RoundTime -= 1
until RoundTime == 0
RoundTime = IRoundTime
Time.Value = ITimeBeforeTeleport
game.ReplicatedStorage.TeleportPlayer:Fire(RoundFinishedTeleport)
end
this
Well, what you would do is:
local Time = 300
local TimeConversion = convertToHMS(Time)
print(TimeConversion)
wat
Type three of these `
and put lua
and then press shift enter
and put three at the bottom
and code in the middle
im trying to change the script i just sent into minutes instead of seconds
You are confusing me, read the DevForum post please.