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

How to store multiple values under the same Data Store entry (Tables in Data Stores)?

Asked by
RedCombee 585 Moderation Voter
9 years ago

I'm looking into making a decent way to make a Pokemon team save into a Data Store, and save the Pokemon's stats into the entry of the specific Pokemon. Is there any way to do this?

1 answer

Log in to vote
0
Answered by 9 years ago

Have you heard of JSONEncode?

You can use that to turn any table into a save able string.

You can then use JSONDecode to turn that string into a table again. Sorry i am unable to present tou any code; im on mobile.

Encode:

http://wiki.roblox.com/index.php?title=JSONEncode_(Method)

Decode:

http://wiki.roblox.com/index.php?title=JSONDecode_(Method)

note that in the decode example, the MyJSON is the JSON encoded table

Ad

Answer this question