How would I make a intvalue reset after 24 hours?

  1. I’m trying to make it so when an IntValue has hit a certain value(0) it counts down for 24 hours and after 24 hours makes the Value 2.

  2. I don’t know how to do so. I think I could use os.time or tick(), but I don’t think any of these would fit what I’m trying to do(at least os.time as it uses Unix time).

  3. I tried looking at the API for os.time, and it really didn’t fit what I wanted. I don’t know how I would make it so that os.time = os.time + 24 hours.

I don’t need a whole system, more just code examples or API references.

1 Like

I’ll self link here

So I would essentially just save the date of when the players value hit 0, then just wait tell it has been 24 hours since that date?

Yeah more or less. Drawing out a flow chart can be useful to make sure you take into account things like players leaving and rejoining.

I would just like to say that most roblox servers aren’t open for 24 hours unless they are extremely full so you might never hit this countdown :frowning: