Twitter Code Gui

datastore

How do I let the code be reused

not datastore

Then just dont do datastore loll

1 Like

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.