I need to have a new ID for each week, that changes every Sunday or Monday.

I'm using math.floor(math.floor(os.time()/(60*60*24*7))), but I'm not sure if:

  1. It'll actually work in practice, and
  2. It'll change on Sunday/Monday

I'm using the ID to save things on a DataStore, by the way.

Is there another way to do this?

2 comments

0

Just a heads up, it looks like that January 1st of 1970 was a Thursday, so you might want to keep that in mind when creating your script.

0

That's helpful, thanks