Hello! I’m doing a Script that changes the Lighting properties with a ModuleScript.
There’s no error and the Lighting won’t change, even the print included don’t display on the Output.
Here is the Module Script + the script
Module Script
local Data = {
["Lighting"] = {
["ClockTime"] = -9.5866670608521,
["ColorShift_Bottom"] = Color3.fromRGB(0, 0, 0),
["FogColor"] = Color3.fromRGB(192, 192, 192),
["FogEnd"] = 100000,
["FogStart"] = 0,
["EnvironmentDiffuseScale"] = 0,
["EnvironmentSpecularScale"] = 0,
["ExposureCompensation"] = 0,
["GeographicLatitude"] = 44.602531433105,
["Ambient"] = Color3.fromRGB(152, 152, 152),
["OutdoorAmbient"] = Color3.fromRGB(128, 128, 128),
["ShadowSoftness"] = 0.20000000298023,
["Brightness"] = 2,
["ColorShift_Top"] = Color3.fromRGB(0, 0, 0),
["GlobalShadows"] = true
},
}
Script
local Save = require(Module)
local Lighting = game:GetService("Lighting")
Lighting:ClearAllChildren()
for v, Setting in ipairs(Save.Lighting) do
print("Changing")
print(v, Setting)
Lighting[v] = Setting
end
I don’t have an idea why it don’t work so i hope you guys can help me!