Skip to content

Instantly share code, notes, and snippets.

@spotco
Last active December 3, 2022 18:14
Show Gist options
  • Save spotco/36085c84cfd57e5bc241a344ff511ba5 to your computer and use it in GitHub Desktop.
Save spotco/36085c84cfd57e5bc241a344ff511ba5 to your computer and use it in GitHub Desktop.
sky_and_lighting_to_lua.lua
local sky = game.Selection:Get()[1]
assert(sky.ClassName == "Sky")
local msg = string.format([[
sky.SkyboxBk = "%s"
sky.SkyboxDn = "%s"
sky.SkyboxFt = "%s"
sky.SkyboxLf = "%s"
sky.SkyboxRt = "%s"
sky.SkyboxUp = "%s"
]],
sky.SkyboxBk,
sky.SkyboxDn,
sky.SkyboxFt,
sky.SkyboxLf,
sky.SkyboxRt,
sky.SkyboxUp
)
print(msg)
---
local lighting = game.Selection:Get()[1]
assert(lighting.ClassName == "Lighting")
local msg = string.format([[
lighting.Ambient = Color3.new(%s)
lighting.Brightness = %s
lighting.ColorShift_Bottom = Color3.new(%s)
lighting.ColorShift_Top = Color3.new(%s)
lighting.OutdoorAmbient = Color3.new(%s)
lighting.ClockTime = %s
lighting.GeographicLatitude = %s
]],
tostring(lighting.Ambient),
tostring(lighting.Brightness),
tostring(lighting.ColorShift_Bottom),
tostring(lighting.ColorShift_Top),
tostring(lighting.OutdoorAmbient),
tostring(lighting.ClockTime),
tostring(lighting.GeographicLatitude)
)
print(msg)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment