Hello there dear scripters! I’m again in need of some help with a script. I’ve been working on a script that makes the fog color change whenever the clock time hits 17.8 to 17.9 It’s not working though. This is the script:
local Lighting = game.Lighting
Lighting:GetPropertyChangedSignal("ClockTime"):Connect(function()
if Lighting.ClockTime >= 19.6 and Lighting.ClockTime <= 19.7 then
Lighting.FogColor = Color3.fromRGB(15,15,15)
end
end)
First - check your time changing. Maybe ClockTime can’t be between 19.6 and 19.7?
And second - use game:GetService(“Lighting”) instead of game.Lighting.
I have already checked if the clock time can be between 19.6 and 19.7 and I’ve already tried using GetService.
I dont think GetService changes anything too much in here, but do you know if the error is that
-
ClockTime is never between 19.6 and 19.7
or
-
Lighting.FogColor doesn’t work?
Also, something that entered my mind, are you calling this from a script of a localscript?