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

DataStores - Keys vs Tables?

Not really any coding needed, but what is better with DataStoring keys or tables and if there are any disadvantages/advantages to using either one?

PlayerData = {}

or

local Key = "user_" ..Player.userId

2 answers

✓ Accepted answer

Tables can be used to import tools or weapons and save their data where keys can be used to save stats like money and levels or ranks. You can insert stuff into the tables at anytime[Example: you can make a backpack system with datastore tables] but with keys all you can really do is save numbers.

I honestly don't see any sane way to use tables for storing keys. I would use the good ol' userId because you don't have to write players into each part of the table.

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