Help with tables & folders ProfileService

  1. What do you want to achieve?
    A clear answer on how to insert a tables values as string in a folder, but it also changes the folders strings if something is removed in the table / whatever changes in the folder its also done in the table

  2. What is the issue?
    Cant find any help or reference with what i want to achieve.

  3. What solutions have you tried so far?
    Looked at devforum, all the ProfileService ones i can find, none have really answered this.

I know how to get a table and insert or remove stuff within it but for that i need it to be in a server script (to get dataManager).
Some of my local scripts require to just see through the players table which i cant do because i need dataManager so im thinking it can look through a folder that has the tables values.

An example of what i mean:

local currentQuests = plr:WaitForChild("QuestStore").CurrentQuests
local completedQuests = plr:WaitForChild("QuestStore").CompletedQuests

But this wont work because the folders are empty and although i can do something like this (server script):

	for _, item in pairs(profile.Data.OwnedTools) do
		local value = Instance.new("StringValue")
		value.Name = item
		value.Value = item
		value.Parent = player:WaitForChild("OwnedValues").OwnedTools
	end

But if the table has something added or removed the folder wont change.

1 Like

Would this post help for checking if the tables contents has changed?:

Then all you need to do is change the folder accordingly.

I dont get it, the post talks about when a value has changed (proxy.HP) in the table but i need to know how to check if a value has been added or removed in a table and if it has then it updates the folder. Or if a value has been added or removed in the folder it will do the same to the table.

So if your checking if the anything in the folder has been changed you can use the function childAdded and ChildRemoved.