Class · inherits Instance
Sky
Changes the default appearance of the experience's sky.
About 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
CelestialBodiesShown
: booleanSets whether the sun, moon, and stars will render in the skybox.Determines whether the sun, moon, and stars are rendered in the skybox. Defaults to
true. When set tofalse, the sun, moon, and stars are hidden, regardless of the values of other properties.MoonAngularSize
: floatThe perceived angular size of the moon while using this skybox, in degrees. Defaults to11and is clamped to the range[0, 60].The perceived angular size of the moon while using this skybox, measured in degrees.
MoonTextureContent
: ContentThe image displayed for the moon while using this skybox.The
Contentimage displayed for the moon while using this skybox. Defaults torbxasset://sky/moon.jpg.MoonTextureId
: ContentIdThe texture of the moon while using this skybox.The texture asset ID for the moon while using this skybox. Defaults to
rbxasset://sky/moon.jpg.SkyboxBackContent
: ContentThe image displayed on the back surface of the skybox.The
Contentimage displayed on the back surface of the skybox. Defaults torbxasset://textures/sky/sky512_bk.tex.SkyboxBk
: ContentIdThe URL link to a picture for the back surface of the sky.The texture asset ID for the back surface of the skybox. Defaults to
rbxasset://textures/sky/sky512_bk.tex.SkyboxDn
: ContentIdAsset ID for the bottom surface of the skybox.The texture asset ID for the bottom surface of the skybox. Defaults to
rbxasset://textures/sky/sky512_dn.tex.SkyboxDownContent
: ContentThe image displayed on the bottom surface of the skybox.The
Contentimage displayed on the bottom surface of the skybox. Defaults torbxasset://textures/sky/sky512_dn.tex.SkyboxFrontContent
: ContentThe image displayed on the front surface of the skybox.The
Contentimage displayed on the front surface of the skybox. Defaults torbxasset://textures/sky/sky512_ft.tex.SkyboxFt
: ContentIdAsset ID for the front surface of the skybox.The texture asset ID for the front surface of the skybox. Defaults to
rbxasset://textures/sky/sky512_ft.tex.SkyboxLeftContent
: ContentThe image displayed on the left surface of the skybox.The
Contentimage displayed on the left surface of the skybox. Defaults torbxasset://textures/sky/sky512_lf.tex.SkyboxLf
: ContentIdAsset ID for the left surface of the skybox.The texture asset ID for the left surface of the skybox. Defaults to
rbxasset://textures/sky/sky512_lf.tex.SkyboxOrientation
: Vector3Angle of the skybox, in degrees, with rotation order of Y, X, Z.Changes the orientation of the skybox surfaces. This property takes a
Vector3of 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:
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
: ContentThe image displayed on the right surface of the skybox.The
Contentimage displayed on the right surface of the skybox. Defaults torbxasset://textures/sky/sky512_rt.tex.SkyboxRt
: ContentIdAsset ID for the right surface of the skybox.The texture asset ID for the right surface of the skybox. Defaults to
rbxasset://textures/sky/sky512_rt.tex.SkyboxUp
: ContentIdAsset ID for the top surface of the skybox.The texture asset ID for the top surface of the skybox. Defaults to
rbxasset://textures/sky/sky512_up.tex.SkyboxUpContent
: ContentThe image displayed on the top surface of the skybox.The
Contentimage displayed on the top surface of the skybox. Defaults torbxasset://textures/sky/sky512_up.tex.StarCount
: intHow many stars are shown in the skybox.How many stars are shown in the skybox. Only works if
CelestialBodiesShownistrue.SunAngularSize
: floatThe perceived angular size of the sun while using this skybox, in degrees.The perceived angular size of the sun while using this skybox, in degrees. Defaults to
21and is clamped to the range[0, 60].SunTextureContent
: ContentThe image displayed for the sun while using this skybox.The
Contentimage displayed for the sun while using this skybox. Defaults torbxasset://sky/sun.jpg.SunTextureId
: ContentIdThe texture of the sun while using this skybox.The texture asset ID for the sun while using this skybox. Defaults to
rbxasset://sky/sun.jpg.
Sky also has every member of Instance. Deprecated and Roblox-only members are hidden.
Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.