Saving module script

So, I’m trying to make a table in the player with all the names of the quest they are currently doing, for that i need to go through all the quest at the begin of the game to see if the names are in the data store, but i don’t know how to loop through module scripts, without going through everything.

local quests = {
	Bob = {
		name = "Neighbourhood Watch",
		text = "This was a beautiful neighborhood until all these bandits came, could you get rid of them for me?",
		enemy = "Enemy",
		enemyAmount = 5,
		level = 1,
		reward = 25
	}
}

return quests

I only want to go through “Bob” and then the next name

You probably want to define a dictionary of quest ids, using a key like “QUEST_1” and then index it with quests[“QUEST_1”]

You’ll loop through all quests and then get the name by referencing it.

Example:

for _, quest in pairs(quests) do
    print(quest[name])
end