When i do print(Looping) its printing 1 and doesn't augment every time it does loop
01 | wait( 2 ) |
02 | game.Lighting.Ambient = Color 3. fromRGB( 109 , 109 , 109 ) |
03 | game.Lighting.OutdoorAmbient = Color 3. fromRGB( 117 , 117 , 117 ) |
04 |
05 | local Looping = 0 |
06 |
07 | local OR = tonumber (game.Lighting.OutdoorAmbient.r * 255 ) |
08 | local AR = tonumber (game.Lighting.Ambient.r * 255 ) |
09 |
10 | game.Lighting.Changed:Connect( function () |
11 | if game.Lighting.TimeOfDay = = "17:30:00" then |
12 | repeat |
13 | wait( 1 ) |
14 | AR = AR - 0.33333333333333 |
15 | game.Lighting.Ambient = Color 3. fromRGB(AR , AR, AR) |
Instead of in between repeat and until I would try deleting that and making the next like wait(5 or a number) and the part you want to loop in a
1 | while true do |
2 |
3 | end |
while true do means loop which loops the script forever
or if that don't work try using the same script just the part you want to loop place the while true do script and place an end at the end of the script.