I'm trying to make an Arcane Adventures quest system where it saves all your quest and load it in when you rejoin.. but I can't seem to save my table
local dbservice = game:GetService("DataStoreService")
local db = dbservice:GetDataStore("Datastore")
local HttpService = game:GetService("HttpService")
local data = {
["quests"] = {
["quest1"] = false;
["quest2"] = false;
["quest2"] = false;
}
}
game.Players.PlayerAdded:Connect(function(plr)
local plrdata = db:GetAsync(plr.UserId) or data
local re = data.quests.quest1
game.ReplicatedStorage.DataTable:FireClient(plr, re)
end)
local json = HttpService:JSONEncode(data)
print(json)
game.ReplicatedStorage.DataTable2.OnServerEvent:Connect(function(player)
local re = data.quests.quest1
data.quests.quest1 = true
wait(3)
game.ReplicatedStorage.DataTable:FireClient(player, re)
end)
