I’m currently making a map choosing system, with every map having it’s own game.Lighting assets (Sky, ColorCorrection, Atmosphere, etc.). For some reason, Sky makes the map be darker. An example is below.
Crossroads under normal circumstances
Crossroads when
Here’s a code that is responsible for doing this:
function ServerInfo.CorrectTheSun() -- workspace.CurrentAssets:WaitForChild(ServerInfo.Map) references to lighting assets folder. Changing the reference folder's parent does not work.
ServerInfo.VoidWorking = not workspace.CurrentAssets:WaitForChild(ServerInfo.Map):GetAttribute("DisableVoid")
for i, value in pairs(workspace.CurrentAssets:WaitForChild(ServerInfo.Map).Assets.Lighting:GetChildren()) do
value = value:Clone()
value.Parent = game.Lighting
task.wait(0.4) -- Increasing timer or putting sky first/last does not work.
end
game.Lighting.ClockTime = workspace.CurrentAssets:WaitForChild(ServerInfo.Map):GetAttribute("ClockTime")
game.Lighting.GeographicLatitude = workspace.CurrentAssets:WaitForChild(ServerInfo.Map):GetAttribute("Latitude")
end