Files
Hunter/scripts/NightLighting.server.luau
T
2026-11-29 15:49:17 +03:00

34 lines
1.1 KiB
Luau

--!strict
-- Put this Script in ServerScriptService.
-- Turns the map into a dark night. Lighting set on the server replicates to every player.
local Lighting = game:GetService("Lighting")
Lighting.ClockTime = 0 -- midnight
Lighting.Brightness = 0.15
Lighting.Ambient = Color3.fromRGB(8, 8, 12)
Lighting.OutdoorAmbient = Color3.fromRGB(15, 15, 22)
Lighting.ExposureCompensation = -0.5
Lighting.EnvironmentDiffuseScale = 0.1
Lighting.EnvironmentSpecularScale = 0.1
Lighting.GlobalShadows = true
-- Classic fog (only used if there is no Atmosphere object).
Lighting.FogColor = Color3.fromRGB(5, 5, 10)
Lighting.FogStart = 0
Lighting.FogEnd = 350
-- Dark, hazy atmosphere so distant things fade into the night.
local atmosphere = Lighting:FindFirstChildOfClass("Atmosphere")
if not atmosphere then
atmosphere = Instance.new("Atmosphere")
atmosphere.Parent = Lighting
end
assert(atmosphere)
atmosphere.Density = 0.45
atmosphere.Offset = 0
atmosphere.Color = Color3.fromRGB(20, 22, 30)
atmosphere.Decay = Color3.fromRGB(10, 10, 15)
atmosphere.Glare = 0
atmosphere.Haze = 1.5