of     1   

SypherBub453
#184132242Monday, February 22, 2016 6:24 AM GMT

Lets say I have a shop, and you have to buy a sparkle effect, and it goes in your inventory. I want the game to save your inventory of items with data stores in a more efficient way than making a lot of boolvalues.
Lem0nzzx
#184132272Monday, February 22, 2016 6:25 AM GMT

Sorry bud, values are the only way. ________________________________________________________________________
Lem0nzzx
#184132295Monday, February 22, 2016 6:26 AM GMT

DataStore uses player's key to save. It doesn't use objects. However, using a value you can create a changed event for that value so it can input an object. ________________________________________________________________________
USADefender
#184132375Monday, February 22, 2016 6:29 AM GMT

Your best bet would be storing an array containing all the names of the items he owns, and when the player enters it would loop through his array, and load it from ServerStorage or ReplicatedStorage depending on where you'll store the items.
128Gigabytes
#184132389Monday, February 22, 2016 6:29 AM GMT

Thats not correct the data store does not use a 'Player key' to save anything that makes no sense, it uses a string. This string is often the players userId because it is a way to create a unique reference for every player. But the data is not linked to the player in any way.
USADefender
#184132441Monday, February 22, 2016 6:32 AM GMT

Oh forgot to indicate that @128, but thanks. However i think he meant to refer to the key which distinguishes the player's data from any other data, which of course he has to create himself.
Lem0nzzx
#184132457Monday, February 22, 2016 6:33 AM GMT

^^ Exactly ________________________________________________________________________
SypherBub453
#184132567Monday, February 22, 2016 6:37 AM GMT

thx

    of     1