Skyboxes

A skybox is a cube made up of six individual images that create an immersive sky background in an experience. When the images are designed to be perfectly aligned with each other, the skybox appears to be panoramic without the impression of being inside a cube. This makes experiences feel larger than they really are, and it adds depth to your atmosphere, such as simulating deep space or underwater environments.

Additionally, the Sky object includes celestial bodies such as a sun, moon, and stars which dynamically appear, rise, and set based on the TimeOfDay or ClockTime.

Finally, the Sky object can be used as a cubemap for reflections in ViewportFrames. For details, see viewport frames.

Skybox construction

If you've created your own skybox images, you must first import them to Roblox before you can use them in a skybox. Each image must be seamless along all edges of neighboring images when "folded" into a cube.


To create a skybox:

  1. In the Explorer window, insert a Sky object into the Lighting service.

  2. Select the new Sky object, then in the Properties window, assign a texture to each of the following sky properties:

    • SkyboxBk — The back square of the skybox.
    • SkyboxDn — The down square of the skybox.
    • SkyboxFt — The front square of the skybox.
    • SkyboxLf — The left square of the skybox.
    • SkyboxRt — The right square of the skybox.
    • SkyboxUp — The up square of the skybox.

Celestial bodies

By default, the Sky object includes celestial bodies such as a sun, moon, and stars. These bodies dynamically appear, rise, and set based on the TimeOfDay or ClockTime property values.

You can customize celestial bodies through the following properties:

Orientation

The SkyboxOrientation property changes the orientation of the skybox surfaces. The property takes a Vector3 of degree values in the typical XYZ order, but rotation is applied first around the Y axis, then X, and then Z to allow for predictable control over complex movements.

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. The following script, for example, animates the Y axis for spinning while keeping a consistent 30° tilt on the X axis.


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)

Note that skybox orientation is a low-cost feature which works seamlessly across all platforms and visual quality levels. As a result, some intentional exceptions include:

  • If the sky is visible in indoor reflections such as a mirror surface through an open window, that specific reflected view will not be rotated. Achieving this would require expensive re‑rendering and convolving of cubemaps which would significantly impact performance and broad availability.
  • Only the skybox surfaces rotate; celestial bodies are not affected by this property.
  • If you utilize a Sky within a ViewportFrame, it will reflect the global SkyboxOrientation values. You cannot adjust the angle per ViewportFrame.
  • The dynamic clouds feature under Terrain is not impacted.