sky
The sky namespace — the engine's Luau API reference for sky.
The sky namespace — 6 functions.
globals/sky/get
globals/sky/get() -> { [string]: any }
Get all current sky configuration as a table. Returns the
same fields as sky.set accepts, plus read-only fields like
material_name and type. Color values are returned as
positional arrays [r, g, b].
globals/sky/getTimeOfDay
globals/sky/getTimeOfDay() -> number
Get the current time of day in hours (0-24).
globals/sky/preset
globals/sky/preset(name: string)
Apply a named sky preset. Available: clear_day, sunset,
sunrise, overcast, night, studio, none. Raises a Luau
error for unrecognized names — wrap in pcall if uncertain.
globals/sky/set
globals/sky/set(opts: SkyOpts)
Configure the sky system. All fields are optional — only
provided fields are updated. Color fields accept both named
{x=r, y=g, z=b} and positional {r, g, b} forms. color is
an alias for solid_color.
globals/sky/setSunDirection
globals/sky/setSunDirection(dir: SkyColor)
Set an explicit sun direction and disable time-based sun positioning. The directional light is updated to match.
globals/sky/setTimeOfDay
globals/sky/setTimeOfDay(time: number)
Set the time of day (0-24 hours). 0 = midnight, 6 = sunrise, 12 = noon, 18 = sunset.