So, I've created a table using HTTP Service and JSON:Encode and JSON:Decode.
I can't figure out how to save this table and change the values inside of it?
ServerScript inside ServerScriptService:
game.Players.PlayerAdded:Connect(function(player) local swordData = Instance.new("Folder",player) swordData.Name = "SwordData" local ns = Instance.new("BoolValue",swordData) ns.Name = "NS" local http = game:GetService("HttpService") local items = { Swords = { ["Normal Sword"] = true, ["Cool Sword"] = false } } wait() local savedTable = http:JSONEncode(items) print(savedTable) local loadedTable = http:JSONDecode(savedTable) print(loadedTable.Swords["Normal Sword"]) player.SwordData.NS.Value = loadedTable.Swords["Normal Sword"] end)
Any help would be appreciated!
well you need to use the Datastore service, datastore service saves strings, and numbers to the Roblox Servers, you can retrieve the data and do whatever you want to with it; since i don't have much time as of right now, Here are videos and articles that explain Datastore service
Good luck!