n = math.random(1, 24) print("number is" ..n) while true do wait(0.01) if game.Lighting.ClockTime == n then game.ServerScriptService.Rain:Clone().Parent = game.Players.LocalPlayer.Backpack n = math.random(1,24) print("number is " ..n) break end end
The problem is that for you is that math.random is based on the number you got before. Thats why IT always Will return the same Value IF its not running more then once.