Hey everybody, I made it so when a player buys a gamepass, the gamepass works for 30 days and then expires. But I want it to show when the gamepass will expire.
When the player buys the gamepass, “os.time() + 2592000” is added to the datastore, but how do I convert this to the players timezone?
DateTime.FromUnixTimestamp(yourTimeValue):ToLocalTime
Should return a table with .Year .Month etc values based on the local time of the machine running the code.
Not an answer to your question, as that was already solved, but:
Why don’t you just enable private servers for the game, set the price to what you want it to be, and let players do it that way? It lets Roblox handle everything.