Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

findTimeOfDay

findTimeOfDay(world, options?): number | undefined

The hour of the world’s day: from 0 up to but not 24, with the minutes as a fraction, so 18.5 is half past six in the evening, as Roblox’s Lighting.ClockTime reads. Derived from the clock’s anchor at the tick the read stands on: a system’s own tick, or between steps the tick the world steps next, so a room, a headless run and every page read the same hour at the same tick, and nothing is sent while it runs. A page in a room reads it at the player’s own tick. Undefined where no clock is found: a scene with no Landscape, a page in a room before the room’s clock streams in, or a ground with no clock. Throws where two Landscapes keep one each and options names no ground.

Parameter Type Default value
world World undefined
options TimeOfDayOptions noOptions

number | undefined