Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Getting every key in a datastore?

Is it possible without Ordered datastores? I need to use strings, so I can't use them.

1 comment

0

You cannot get a list of keys that the data store uses. An ordered data store does not know the key it knows that the data is in a set order and can return this data.

1 answer

No, but you can use OrderedDataStores to (help) store strings:

  • Remember that the key can be up to 50 characters long
  • If the string is small enough, you can convert the string into a number (though you have to write this algorithm yourself).
  • If you know all the possible strings when scripting, you could assign each string a number and store that intead
  • You could also store a number that refers to a specific non-ordered DataStore key that stores the actual string

This discussion is preserved as it was. New answers, comments, and votes are closed.