Sky
Summary
Properties
MoonTextureId:ContentId |
SkyboxBk:ContentId |
SkyboxDn:ContentId |
SkyboxFt:ContentId |
SkyboxLf:ContentId |
SkyboxRt:ContentId |
SkyboxUp:ContentId |
SunTextureId:ContentId |
API Reference
Properties
Moon Texture Id
Sky. Moon Texture Id:ContentId
Skybox Bk
Sky. Skybox Bk:ContentId
Skybox Dn
Sky. Skybox Dn:ContentId
Skybox Ft
Sky. Skybox Ft:ContentId
Skybox Lf
Sky. Skybox Lf:ContentId
Skybox Orientation
Code Samples
Skybox Orientation with Tween
local Lighting = game:GetService("Lighting")
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")
local sky = Lighting:FindFirstChild("Sky")
local ROTATION_SPEED = 4 -- In degrees per second
local MAX_TILT = 2 -- In degrees
local TILT_SPEED = 4
local currentTilt = Instance.new("NumberValue")
currentTilt.Value = -MAX_TILT
local tweenGoal = { Value = MAX_TILT }
local tweenInfo = TweenInfo.new(TILT_SPEED, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut, -1, true)
local tween = TweenService:Create(currentTilt, tweenInfo, tweenGoal)
tween:Play()
RunService.Heartbeat:Connect(function(deltaTime)
sky.SkyboxOrientation =
Vector3.new(currentTilt.Value, (sky.SkyboxOrientation.Y + ROTATION_SPEED * deltaTime) % 360, 0)
end)Skybox Rt
Sky. Skybox Rt:ContentId
Skybox Up
Sky. Skybox Up:ContentId
Sun Texture Id
Sky. Sun Texture Id:ContentId