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

How to make advanced tool saver?

Asked by 6 years ago

Guys, I want to ask, how to make it so you can "really" save your tools? All tutorial that I got is just saving the tool's name and clone a tool to your BackPack from lighting/replicatedstorage. That type of saving will never work on my game, because my game will have Enhancement system that will increase the sword's damage, and "Create your own sword" system. Please help me!

2 answers

Log in to vote
0
Answered by
Avigant 2374 Moderation Voter Community Moderator
6 years ago

You can't save instances with a DataStore, so you must serialize the user-customizable data into a table and save that in the complete table of player data you save into the DataStore normally, like so:

local PlayerData = {
    Tool = {
        BigSwordOfLightning = {
            Name = "Jeff's Sword!",
            Hilt = "Wood",
            Blade = "Steel"
        },
        VolcanicSword = {
            Name = "Reaper",
            Hilt = "Volcanic Magma",
            Blade = "Ore"
        }
    }
}
0
I see.. thank you :) FlonexVorry 28 — 6y
Ad
Log in to vote
0
Answered by 6 years ago

You weren't very specific but I am assuming you meant respawn with it? Parent the tools to the StarterPack service.

0
No, I mean.. How to make it so you can save your tool in data store. So, if you leave then join, your tool will always be there. FlonexVorry 28 — 6y

Answer this question