How would i go about saving weapons data? Equipped/Unequipped

So I am struggle to understand how to save weapons data like weapons damage.

local Save_Table_Data = {
      ["EquippedWeapon"] = Defualt,
      ["Damage"] = 10,

Someone sent me this and I’m not quite sure how this works and where would I have this, in a datastore script? and how would it save Datastore:SetAsync(key, Save_Table_Data) . Not sure, I really want to learn datastore as its essential to making a good game, and also minimum loss of data.

Do a search on and you’ll find helpful information on how to use DataStores. The data that someone sent you is likely supposed to be converted to JSON before going into the DataStore. JSON lets you convert a table into a string, and then you can take that string and save it in the DataStore to be retrieved later.

I made a datastore, and for some reason it doesn’t save. I am using datastore2.

local data = {}

local HttpService = game:GetService("HttpService")
local players = game:GetService("Players")
local Datastore2 = require(script.Parent.DataStore2) -- Get datastore2 module -- 1936396537
Datastore2.Combine("Inventory", "Gold", "Armour", "Potions", "Weapons","Health","Damage","MagicDamage","Level", "Experience","MaxExperience")

data.AddedEvent = function(player)
	--// Inventory System
	local Inventory ="Folder", player); Inventory.Name = "Inventory"
	local playerGold ="IntValue", Inventory); playerGold.Name = "Gold"
    local playerArmour ="StringValue", Inventory); playerArmour .Name = "Armour"
    local playerPotions ="StringValue", Inventory); playerPotions .Name = "Potions"
	local playerWeapons ="StringValue", Inventory); playerWeapons .Name = "Weapons"
	--// Player Stats
	local playerHealth ="IntValue", Inventory); playerHealth.Name = "Health"; playerHealth.Value = 100
	local playerDamage ="IntValue", Inventory); playerDamage.Name = "Damage"
	local playerMagicDmg ="IntValue", Inventory); playerMagicDmg.Name = "MagicDamage"
	--// Players Level
	local LevelSystem ="Folder", player); LevelSystem.Name = "LevelSystem"
	local PlayerLevel ="IntValue", LevelSystem); PlayerLevel.Name = "Level"; PlayerLevel.Value = 1
	local PlayerXp ="IntValue", LevelSystem); PlayerXp.Name = "Experience"
	local PlayerMaxXp ="IntValue", LevelSystem); PlayerMaxXp.Name = "MaxExperience" 
	--// Datastore 
    local goldStore = Datastore2("Gold", player); local goldStoreData = goldStore:Get()
    local armourStore = Datastore2("Armour", player); local armourStoreData = armourStore:Get({ })
    local potionsStore = Datastore2("Potions", player); local potionsStoreData = potionsStore:Get({ })
	local weaponsStore= Datastore2("Weapons", player); local weaponsStoreData = weaponsStore:Get({ })
	local healthStore = Datastore2("Health", player); local healthStoreData = healthStore:Get()
	local damageStore = Datastore2("Damage", player); local damageStoreData = damageStore:Get()
	local magicStore = Datastore2("MagicDamage", player); local magicStoreData = magicStore:Get()
	local levelStore = Datastore2("Level", player); local levelStoreData = levelStore:Get()
	local xpStore = Datastore2("Experience", player); local XpStoreData = xpStore:Get()
	local maxxpStore = Datastore2("MaxExperience",player); local MaxXpStoreData = maxxpStore:Get()
	--// JSON Encode/Decode 
    playerArmour.Value = HttpService:JSONEncode(armourStoreData) 
        playerArmour.Value = HttpService:JSONEncode(decodedData) -- Encodes newly updated data

    playerPotions.Value = HttpService:JSONEncode(potionsStoreData) 
         playerPotions.Value = HttpService:JSONEncode(decodedData) -- Encodes newly updated data
    playerWeapons.Value = HttpService:JSONEncode(weaponsStoreData) 
        playerWeapons.Value = HttpService:JSONEncode(decodedData) -- Encodes newly updated data

return data