Toggling Between Day/Night Mode With UI: Partial Script Failure (Further Issues)

I made a post about this issue yesterday, but I have ran into one additional issue.

I’m making the ability to toggle between day/night mode with UI in my game. It’s essentially a two button system, where, upon clicking one of the buttons, the local change within the lighting occurs. The script to toggle day mode is working fine, but in night mode — the color values are not changing as intended. For example, in night mode, Ambient, Colorshift, etc. , are supposed to change — and the change is not occurring within the script. It is occuring in the day mode button, however, upon returning back to it.

Here’s the script that is not completely working as intended, particularly the issue being around the lines that regard changing certain RGB colors.

script.Parent.MouseButton1Click:Connect(function()
	game.Lighting.ClockTime=3
	game.Lighting.ExposureCompensation=0
	game.Lighting.GlobalShadows=true
	game.Lighting.Atmosphere.Color=Color3.fromRGB(33, 21, 32)
	game.Lighting.Atmosphere.Decay=Color3.fromRGB(11, 11, 13)
	game.Lighting.Sky.SunAngularSize=6
	game.Lighting.Atmosphere.Glare=0.42
	game.Lighting.Atmosphere.Haze=2.07
	game.Lighting.Atmosphere.Density=0.4
	game.Lighting.Sky.CelestialBodiesShown=false
	game.Lighting.Sky.StarCount=1000
	game.Lighting.Bloom.Size=0.5
	game.Lighting.Bloom.Threshold=30
	game.Lighting.Bloom.Intensity=2.048
	game.Lighting.Blur=0
	game.Lighting.ColorCorrectionEffect.TintColor=Color3.fromRGB(63, 60, 59)
	game.Lighting.ColorCorrectionEffect.Contrast=0
	game.Lighting.ColorCorrectionEffect.Saturation=0
	game.Lighting.ColorCorrectionEffect.Brightness=0.06
	game.Lighting.DepthOfFieldEffect.FarIntensity=0.899
	game.Lighting.DepthOfFieldEffect.InFocusRadius=50
	game.Lighting.DepthOfFieldEffect.NearIntensity=0
	game.Lighting.DepthOfFieldEffect.FocusDistance=200
	game.Lighting.SunRaysEffect.Intensity=0.049
	game.Lighting.SunRaysEffect.Spread=0.11
	game.Lighting.Ambient= Color3.fromRGB(59, 59, 59)
	game.Lighting.EnvironmentDiffuseScale=0.5
	game.Lighting.EnvironmentSpecularScale=0.5
	game.Lighting.OutdoorAmbient = Color3.fromRGB(45, 45, 53)
	game.Lighting.ColorShift_Top = Color3.fromRGB(15, 15, 15)
	game.Lighting.ColorShift_Bottom = Color3.fromRGB(0, 0, 0)
	game.Lighting.ShadowSoftness=0.1
	game.Lighting.GeographicLatitude=58.763
	game.Lighting.TimeOfDay = 3
	game.Lighting.Brightness=0
end)

Hi, according to the script, in line 16, there was an error.

Blur is not a valid member of Lighting “Lighting” - Client - LocalScript:16

So I think that’s the reason.

1 Like