Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

DataStores - Keys vs Tables?

Asked by
iFlusters 355 Moderation Voter
8 years ago

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

Log in to vote
0
Answered by 8 years ago

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.

Ad
Log in to vote
0
Answered by 8 years ago

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.

Answer this question