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

How to save a folder with values? [closed]

Asked by
Kami_Yo 72
6 years ago
Edited 6 years ago

This question already has an answer here:

How to save a folder and it's values?

I am trying to save a folder with values. So I'm trying to do that by making a table within a table.

This is what I'm trying to do:

["QUEST1"] = {
        ["Name"] = "Monster Hunt",
        ["Type"] = "HUNT",
        ["Number"] = 5,
    }

And this is how I've been trying to do it. But I'm pretty new to Lua and tables so I'm having a little difficulty with it.

local activeQuests = {}
for i, quest in pairs(player:FindFirstChild("QuestsTaken"):GetChildren()) do 
    local valueTable = {}
    for j, value in pairs(quest:GetChildren()) do 
        table.insert(valueTable[j], value)
    end 

    table.insert(activeQuests[quest.Name], valueTable)
end
0
Don't post duplicate questions EpicMetatableMoment 1444 — 6y

Marked as Duplicate by DinozCreates, Rheines, WideSteal321, Fragmentation123, and User#5423

This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.

Why was this question closed?