Skip to main content

ClockGet

Description​

Returns the current in-game time as hours and minutes.

function ClockGet() --[[ ... ]] end

Parameters​

None.

Return Values​

  • hour: integer - Current in-game hour.
  • minute: integer - Current in-game minute.

Example​

Constantly print the current in-game time.

local ClockH, ClockM

while true do
ClockH, ClockM = ClockGet()
TextPrintString("It is currently "..ClockH..":"..ClockM, 0, 1)
Wait(0)
end