You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve? Keep it simple and clear!
Hello, I’m really new to scripting but I want to make that when the clock time reaches 18 the offset, haze and density changes so it becomes darker
-
What is the issue? Include screenshots / videos if possible!
It doesn’t change no matter what I try. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tried using repeat until but for some reason it doesn’t work. I also tried using while wait.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local offset = game.Lighting.Atmosphere.Offset == 0.25
local haze = game.Lighting.Atmosphere.Haze == 0
local density = game.Lighting.Atmosphere.Density == 0.3
local ctime = game.Lighting.ClockTime
while wait() do
if ctime >= 18 then
repeat
offset = offset + 0.00038833333
haze = haze + 0.01666666666
density = density + 0.00129166666
print("working")
wait(0.6)
until offset == 0.233
end
end