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

How do I save a player's backpack items?

Asked by 10 years ago

Relating to my last question, I'm scripting a Data Persistence thing for my RPG game, and I want the script to save the player's backpack. How does one go about this? Also, please explain everything you write down, so that I know for the future.

Thanks!

2 answers

Log in to vote
0
Answered by 10 years ago

Well because data persistance is not as reliable as datastore, i would use datastores.

I would create an ID for each sword, hat, gear, staff, or whatever, and each ID is unique. Then, I would create a string value inside the player called "Save".

Then, I when a player enters, it loads the string value, and inside it, it would have the data.

ie: "1,3,15,95,101" and then use some string doodas to pick out the numbers individually, then give the player all the items based off of what number to use.

PS: what I mean by doodas is this: http://wiki.roblox.com/index.php?title=String_pattern

0
How would I go about picking the numbers around the string? The Wiki doesn't really help with picking the numbers out and doing things with the numbers. SlickPwner 534 — 10y
Ad
Log in to vote
0
Answered by 10 years ago

Note:The ID can be used to spawn items with Cheat Engine so don't use 1-10000 because thoughts are the most used ones and easy to find out! If i was you i would write each code and it name in notepad doc. :) -Kyle

Answer this question