Help with ProfileService data store

I still have default values that came with ProfileService in my data store. I still have “Cash,” “LogInTimes,” and “Items.” I do have one thing I made in the data store that is now not needed but is still there.

Do I remove these from the player’s data when they join or somehow remove it manually?

I think the standard way to resolve this is to just update data when a player joins. The built-in Profile:Reconcile() method seems to only add data so I think you’d need to write your own update logic.

1 Like

Replace the default Reconcile function inside the ProfileService module with this code

local function ReconcileTable(target, template)
	for k, v in pairs(template) do
		if type(k) == "string" then -- Only string keys will be reconciled
			if target[k] == nil then
				if type(v) == "table" then
					target[k] = DeepCopyTable(v)
				else
					target[k] = v
				end
			elseif type(target[k]) == "table" and type(v) == "table" then
				ReconcileTable(target[k], v)
			end
		end
	end
	
	for k, v in pairs(target) do
		if type(k) == "string" or type(k) == "table" then
			if template[k] == nil then
				if type(v) == "table" then
					target[k] = nil
				end
			end
		end
	end
end