-
What do you want to achieve?
If the gae.Lighting.TimeOfDay is between 20 and 8 for it to work -
What is the issue?
It does not work. Doesn’t throw a error or anything, so it’s a conditional error. -
What solutions have you tried so far?
I tried printing what the TimeOfDay was and it didn’t help me at all.
local TimeOfDay = 0.1
local TimeAdd = 0.001
local NoticedNight = false
while task.wait(TimeOfDay) do
game:GetService("Lighting").ClockTime += TimeAdd
end
game:GetService("RunService").Stepped:Connect(function()
if (game:GetService("Lighting").ClockTime < 8 and game:GetService("Lighting").ClockTime > 20) and NoticedNight == false then
NoticedNight = true
TimeOfDay = 0.05
print("it's night")
end
end)