Daily Reward Timer Not Working

Hello, I was making this daily reward system but it is in os.date so for the timer i had to save another os.time value to the datastore when the proximity prompt is activated but the timer doesn’t work. I need the Timer to be working and if someone can help me that’d be great.

If you can rearrange the script to work with os.time that will also be appreciated but if not then i just need the timer to give me the exact amount of hours left for the next reward with seconds so i need help thanks.

When you claim the daily reward, save the os.time() to the datastore. And when the player claims again, check if the os.time() - the last time they claimed is equal or greater than 24 hours/86400 seconds.