I’ve been working on a game like S.T.A.L.K.E.R for a bit now. I have most of the mechanics done, so I decided I wanted to create a weather cycle system.
I scripted the weather system and pressed play. That’s when I saw this:
robloxapp-20231025-0736014.wmv (927.3 KB)
It looks like the brightness is WAY too high.
I checked the code, but it sets the brightness to normal values such as 1.3. I’ve tried searching for fixes for a bit, but haven’t found anything helpful.
this is the manager script:
local HOWL_weather_manager = {}
local lighting = game:GetService("Lighting")
local global_sounds = workspace:WaitForChild("global_sounds")
local weather_change_time = 15
function HOWL_weather_manager.setup()
weather_cycle()
end
function weather_cycle()
while true do
local module = require(script:GetChildren()[math.random(1, #script:GetChildren())])
stop_sounds()
clear_lighting()
module:set_weather()
task.wait(weather_change_time)
end
end
function clear_lighting()
for _, obj in pairs(lighting:GetChildren()) do
obj:Destroy()
end
end
function stop_sounds()
for _, sound in pairs(global_sounds:GetDescendants()) do
if sound:IsA("Sound") then
sound:Stop()
end
end
end
return HOWL_weather_manager
this is one of the weather scripts:
local HOWL_weather_rain_1 = {}
local lighting = game:GetService("Lighting")
local global_sounds = workspace:WaitForChild("global_sounds")
function HOWL_weather_rain_1:set_weather()
sort_lighting()
end
function sort_lighting()
lighting.Brightness = 1.3
lighting.Ambient = Color3.new(0, 0, 0)
lighting.ColorShift_Top = Color3.new(89, 90, 158)
lighting.ColorShift_Bottom = Color3.new(85, 99, 175)
lighting.OutdoorAmbient = Color3.new(70, 70, 70)
lighting.ShadowSoftness = 0.2
for _, obj in pairs(script:GetChildren()) do
if obj:IsA("SunRaysEffect") or obj:IsA("Atmosphere") or obj:IsA("ColorCorrectionEffect") or obj:IsA("Sky") then
local new_obj = obj:Clone()
new_obj.Parent = lighting
end
end
end
return HOWL_weather_rain_1
All help is appreciated. Sorry if I’m late to respond, I’m not very active on here.