Best way to swap around lightings for different maps?

I wanted to ask if anyone here knows a better way of changing lighting for different maps.

I at first tried to copy and paste lighting but that is not possible, so the only thing I could potentially come up with is manually doing it via script, writing down each specific variable for lighting, atmosphere, sky etc and changing it for the specific map.

surely there is a more efficient way though, I’d hate to waste my time typing all those properties.

I don’t believe there is a specific way. But what you can do to get a table is like

local PropertiesToSave = {"Ambiet","Brightness"}
local Object = game.Lighting

local function GeneratePropertiesTable()
   local ObjectInformation = {}
   for i,v in pairs(PropertiesToSave ) do 
          if Object[v] then
               ObjectInformation[v] = Object[v]


Then you can have a seperate function for setting them

local YourTable =  --Paste your table that was printed
local Object = game.Lighting

local function SetObjectProperties()
   for i,v in pairs(YourTable) do 
          if Object[i] then
               Object[i] =  v


This should work.

1 Like

this should help a little bit, Ill try it out

1 Like

Just to remind you, properties are case specific, so be careful.

I’m having some trouble, this is what I copy and pasted:

local ArcticLighting =  
		["Ambient"] = 0.317647, 0.317647, 0.317647,
		["Brightness"] = 3,
		["ColorShift_Bottom"] = 0, 0, 0,
		["ColorShift_Top"] = 0, 0, 0,
		["EnvironmentDiffuseScale"] = 1,
		["EnvironmentSpecularScale"] = 1,
		["GeographicLatitude"] = 0,
		["OutdoorAmbient"] = 0.211765, 0.211765, 0.211765,
		["ShadowSoftness"] = 0.2000000029802322,
		["TimeOfDay"] = "06:10:00"

When passing through the function, it errors at the color (i.e. ambient and any thing using the color3), I tried using different formatting but I couldn’t seem to get it to work (parentheses, curly brackets)

Maybe use color3.fromRGB but I’m not entirely sure since I haven’t really messed around with the lighting settings