Check that all items are applied(loaded) custom avatar editor

So, I have a custom avatar system for my game with a datastore that stores a list of values which are the names of the items. When the player joins it loads the values to a folder inside the player. My problem is I need to know when the script has gone through the whole list and applied them to the avatar
thanks for any help✌️

maybe like this?..

game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		local Humanoid = Character:WaitForChild("Humanoid")
		local Desc = Humanoid:GetAppliedDescription()
		
		Humanoid:RemoveAccessories() -- Removing Player's Accessories
		
		local Accessories = {"ASSET_ID", "ASSET_ID", "ASSET_ID"...AND SO ON}
		
		Humanoid:ApplyDescription(Desc)
	end)
end)
1 Like

just change the ids with the saved accessory assets id?

1 Like

oh wait i forgot *set the accessories ids on the desc

1 Like

i already have a script for applying the items. I just need a script to somehow check that the number of values stored in the data store is the same as the number of values stored in the folder. I was thinking every time a item is added it could add 1 to a value that has the number of items applied but then i dont know how to get a count of the values in the datastore