datastore
How do I let the code be reused
not datastore
Then just dont do datastore loll
Or change their value manually
in conclusion: datastore
(thank you roblox for making me type this out 30)
What if i do a code for christmas âGiftâ and then for next christmas they cannot use it because it is saved in ds (and i want it to be used once per year)
I know BUT I want some codes to be reused once per year
So put a unique tag on each code, because if you wanted to reset it once per year, you donât know if itâs from this year or last year.
So in each save to the key a tag or make the key a unique tag like âTwitterCode-2021â
wdym tag? its a string value or intvalue?
Or better idea, use a different datastore for each year
Example:
you have a Datastore called â2021â then save the codes to that.
Then in 2022 save the codes to a datastore â2022â, that way you wonât run into the problem of knowing which year itâs from.
I would do the latter example, but I guess if you really want when you release the update with the code for the new year erase the code from the datastore when they join. So everyone has a blank slate. That will work as long as you donât do it when the player is redeeming a code.
Similarly-(ish?) I would just for the easier approach and just make each years code like
Ex: Gift2021, Gift2022, etc
not exactly âresuableâ but good enough
wdym? the example I provided will work perfectly and easily. Just name the datastores based on the year.