The chance keeps repeating and the northern lights show up when it hits one and when Is it possible that every night it does the random chance and only 1 number and not repeat itselfs?
local Time = 00.1 local TimeChange = 1 -- Set high for testing local Lighting = game:GetService("Lighting") local NorthernLights = workspace.Nature.Northerlights.NorthernlightStart while wait(Time) do game.Lighting.ClockTime = game.Lighting.ClockTime + TimeChange if Lighting.ClockTime >= 20 then local Chance = math.random(1,10) warn(Chance) if Chance == 1 then NorthernLights.Beam.Enabled = true NorthernLights.Beam1.Enabled = true NorthernLights.Beam2.Enabled = true NorthernLights.Beam3.Enabled = true end elseif Lighting.ClockTime >= 4 then NorthernLights.Beam.Enabled = false NorthernLights.Beam1.Enabled = false NorthernLights.Beam2.Enabled = false NorthernLights.Beam3.Enabled = false end end
Try to add math.randomseed(os.time())
on the first line, other than that you might try to use another number on 11th line because to my knowledge low numbers come more than high numbers.