#Changing ExposureCompensation from certain times

1 messages · Page 1 of 1 (latest)

undone merlin
#

i need a certain value of ExposureCompensation (-2.18) from time A to time B so 21:00 to 6:00
this the first script that works but only from 0:00 to 6:15

while wait(0.1) do
    game.Lighting.ClockTime = game.Lighting.ClockTime + 1/300
    if game.Lighting.ClockTime < 6.15 then
        game.Lighting.ExposureCompensation = -2.18
    else
        game.Lighting.ExposureCompensation = 0
    end
end

this is the ||second the roblox assistant gave me (just example ok)|| but doesnt work

while true do
    task.wait(0.1)
    game.Lighting.ClockTime = game.Lighting.ClockTime + 1/300
    local clockTime = game.Lighting.ClockTime
    if clockTime >= 21 or clockTime < 6 then
        game.Lighting.ExposureCompensation = -2.18
    else
        game.Lighting.ExposureCompensation = 0
    end
end
drifting marlin
#

You are setting the Lighting.Clocktime to go over 24 hours

#

so like 25 I'm assuming, you could prolly check

#

instead you could use the AI logic so lua if clockTime >= 21 or clockTime < 6 then, then set Lighting.ClockTime = (Lighting.ClockTime + STEP) % 24

#

that way it will return to 0 after the Lighting.ClockTime hits 24

#

actually checking the documentaion, it would just error if it is set over 24 so idk but solution would still work