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

How to Save/Load entire folder using DataStore?

Asked by 3 years ago

I am making a shop gui for clothing, when you buy a shirt or anything it will set the bool value to true so then you may go to the lockers and equip the item. How could I save/load all of the values under the folder using DataStore?

game.Players.PlayerAdded:Connect(function(plr)
    local clothing = Instance.new("Folder")
    clothing.Name = "Clothing"
    clothing.Parent = plr

    local shirt1 = Instance.new("BoolValue")
    shirt1.Name = "LumberShirt"
    shirt1.Parent = clothing

    local pants1 = Instance.new("BoolValue")
    pants1.Name = "NicePants"
    pants1.Parent = clothing

--More Bool Values will be added depending on the amount of clothing.

    end)
0
Maybe :GetChildren() on the folder could work since that will save a table MarkedTomato 810 — 3y

Answer this question