Help with offline reward system

I want to make it so you can claim it only once in less than 24 hours, once a day, and you can claim it again tomorrow and so on. but its not giving the reward. It has one issue its not giving me the reward.

local LastLogin = Profile.Data.LastLogin
    
    local CurrentTime = os.time()

    if LastLogin and LastLogin > 0 then
        
        local OfflineTime = CurrentTime - LastLogin

        if OfflineTime >= DailyOfflineInterval  then
            local GiveOfflineAmount = CalculateClicks(Player, Profile) * OfflineTime * 0.01

            Profile.Data.Stats.TotalClicks += GiveOfflineAmount
            Profile.Data.Stats.Clicks += GiveOfflineAmount

            Player.Stats.TotalClicks.Value += GiveOfflineAmount
            Player.Stats.Clicks.Value += GiveOfflineAmount

            Profile.Data.LastLogin = os.time()

            print("Player claimed offline reward for " .. GiveOfflineAmount .. " clicks.")
        end
    else
        print("New Player")
        Profile.Data.LastLogin = os.time()
    end

Okay I really reamd reseting it take it from me as a deves

Wouldn’t offline rewards encourage not playing the game? Or am I thinking about it too much?

Not really since it just gives 1% on what are you actually getting when playing the game.

What does it print?
What’s the point of LastLogin > 0?

To make sure its greater than 0

The time should never be less than 0 though