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

How would I save tools? *Please read on how I would save!*

Asked by 7 years ago

I created a model into the player and called the model "Status". In status, there is a StringValue named "Ability". For example of what I'm trying to do is, if Ability's value is Magnet, then whenever the player joins,resets,teleports or anything like that the moves of "Magnet" would stay in the Backpack. So I am basically trying to save the value Ability and also what is in the local play's StarterPack / Backpack. Saving tools, how would I start? Please help.

1 answer

Log in to vote
0
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
7 years ago

To save anything, you'd need to use a Datastore. The downside is that you cannot directly save any objects (or, at least physical). You can only save numbers, strings, arrays, and booleans. I'd approach this by saving a string of the tool name, such as "Shovel", and in an array alongside of it, store any other useful information to go along with the tool. To see Datastores in action, see Saving Player Data

0
I have question, would it be possible to save Instance.new values or strings? So I made a instance.new function but then when you leave you won't have that new thing anymore, anyway to save that? BlackOrange3343 2676 — 7y
Ad

Answer this question