Roblox UtilitiesDevlHub Roblox Documentation

Class

Sky

Inherits
Instance › Object
Memory category
Instances

Changes the default appearance of the experience's sky.

The Sky object, when placed inside Lighting, changes the default appearance of the experience's sky. This object's skybox is composed of six sides, like a cube. Rotation of the skybox can be changed through SkyboxOrientation.

The skybox sun, moon, and other celestial objects remain visible unless you turn off the CelestialBodiesShown property. By adjusting the StarCount property, you can change how many stars appear in the sky at night.

This object can also be used as a cubemap for reflections in ViewportFrames, in which case only the Sky object's six‑side Skybox[…] properties are used. For details, see viewport frames.

Properties 21#

CelestialBodiesShownbooleanSets whether the sun, moon, and stars will render in the skybox.ReadSafe
MoonAngularSizefloatThe perceived angular size of the moon while using this skybox, in degrees. Defaults to 11 and is clamped to the range [0, 60].ReadSafe
MoonTextureContentContentThe image displayed for the moon while using this skybox.ReadSafe
MoonTextureIdContentIdThe texture of the moon while using this skybox.ReadSafe
SkyboxBackContentContentThe image displayed on the back surface of the skybox.ReadSafe
SkyboxBkContentIdThe URL link to a picture for the back surface of the sky.ReadSafe
SkyboxDnContentIdAsset ID for the bottom surface of the skybox.ReadSafe
SkyboxDownContentContentThe image displayed on the bottom surface of the skybox.ReadSafe
SkyboxFrontContentContentThe image displayed on the front surface of the skybox.ReadSafe
SkyboxFtContentIdAsset ID for the front surface of the skybox.ReadSafe
SkyboxLeftContentContentThe image displayed on the left surface of the skybox.ReadSafe
SkyboxLfContentIdAsset ID for the left surface of the skybox.ReadSafe
SkyboxOrientationVector3Angle of the skybox, in degrees, with rotation order of Y, X, Z.ReadSafe
SkyboxRightContentContentThe image displayed on the right surface of the skybox.ReadSafe
SkyboxRtContentIdAsset ID for the right surface of the skybox.ReadSafe
SkyboxUpContentIdAsset ID for the top surface of the skybox.ReadSafe
SkyboxUpContentContentThe image displayed on the top surface of the skybox.ReadSafe
StarCountintHow many stars are shown in the skybox.ReadSafe
SunAngularSizefloatThe perceived angular size of the sun while using this skybox, in degrees.ReadSafe
SunTextureContentContentThe image displayed for the sun while using this skybox.ReadSafe
SunTextureIdContentIdThe texture of the sun while using this skybox.ReadSafe

CelestialBodiesShown: boolean#

ReadSafe

Determines whether the sun, moon, and stars are rendered in the skybox. Defaults to true. When set to false, the sun, moon, and stars are hidden, regardless of the values of other properties.

MoonAngularSize: float#

ReadSafe

The perceived angular size of the moon while using this skybox, measured in degrees.

MoonTextureContent: Content#

ReadSafe

The Content image displayed for the moon while using this skybox. Defaults to rbxasset://sky/moon.jpg.

MoonTextureId: ContentId#

ReadSafe

The texture asset ID for the moon while using this skybox. Defaults to rbxasset://sky/moon.jpg.

SkyboxBackContent: Content#

ReadSafe

The Content image displayed on the back surface of the skybox. Defaults to rbxasset://textures/sky/sky512_bk.tex.

SkyboxBk: ContentId#

ReadSafe

The texture asset ID for the back surface of the skybox. Defaults to rbxasset://textures/sky/sky512_bk.tex.

SkyboxDn: ContentId#

ReadSafe

The texture asset ID for the bottom surface of the skybox. Defaults to rbxasset://textures/sky/sky512_dn.tex.

SkyboxDownContent: Content#

ReadSafe

The Content image displayed on the bottom surface of the skybox. Defaults to rbxasset://textures/sky/sky512_dn.tex.

SkyboxFrontContent: Content#

ReadSafe

The Content image displayed on the front surface of the skybox. Defaults to rbxasset://textures/sky/sky512_ft.tex.

SkyboxFt: ContentId#

ReadSafe

The texture asset ID for the front surface of the skybox. Defaults to rbxasset://textures/sky/sky512_ft.tex.

SkyboxLeftContent: Content#

ReadSafe

The Content image displayed on the left surface of the skybox. Defaults to rbxasset://textures/sky/sky512_lf.tex.

SkyboxLf: ContentId#

ReadSafe

The texture asset ID for the left surface of the skybox. Defaults to rbxasset://textures/sky/sky512_lf.tex.

SkyboxOrientation: Vector3#

ReadSafe

Changes the orientation of the skybox surfaces. This property takes a Vector3 of degree values in the typical XYZ order, but applies rotation first around the Y axis. After applying the Y axis rotation, the orientation is applied to the X and Z axes to allow for predictable control over complex movements. Your camera and object orientation can affect how this rotation appears to be applied.

An easy way to script an orientation animation is to spin around the Y axis (keeping the horizon level), then tilt this axis by setting X and Z to a fixed value:

Luau
local Lighting = game:GetService("Lighting")
local RunService = game:GetService("RunService")

local sky = Lighting:FindFirstChild("Sky")

local ROTATION_SPEED = 5  -- In degrees per second

RunService.Heartbeat:Connect(function(deltaTime)
	sky.SkyboxOrientation = Vector3.new(
		30,
		(sky.SkyboxOrientation.Y + ROTATION_SPEED * deltaTime) % 360,
		0
	)
end)

See here for further info and limitations.

SkyboxRightContent: Content#

ReadSafe

The Content image displayed on the right surface of the skybox. Defaults to rbxasset://textures/sky/sky512_rt.tex.

SkyboxRt: ContentId#

ReadSafe

The texture asset ID for the right surface of the skybox. Defaults to rbxasset://textures/sky/sky512_rt.tex.

SkyboxUp: ContentId#

ReadSafe

The texture asset ID for the top surface of the skybox. Defaults to rbxasset://textures/sky/sky512_up.tex.

SkyboxUpContent: Content#

ReadSafe

The Content image displayed on the top surface of the skybox. Defaults to rbxasset://textures/sky/sky512_up.tex.

StarCount: int#

ReadSafe

How many stars are shown in the skybox. Only works if CelestialBodiesShown is true.

SunAngularSize: float#

ReadSafe

The perceived angular size of the sun while using this skybox, in degrees. Defaults to 21 and is clamped to the range [0, 60].

SunTextureContent: Content#

ReadSafe

The Content image displayed for the sun while using this skybox. Defaults to rbxasset://sky/sun.jpg.

SunTextureId: ContentId#

ReadSafe

The texture asset ID for the sun while using this skybox. Defaults to rbxasset://sky/sun.jpg.

Inherited members#

Inherited from Instance 58
Inherited from Object 6
Properties (2)

ClassName, className

Events (1)

Changed