So this script is a data saving backpack script Inventory is a Folder that holds all the items this folder is in the serverstorage Classification is a StringValue to Classify the item name I added it because I tend to change the name of my tool sometimes by mistake and as you know this script uses SetAsync() which means once I join a server with changed name it will be gone forever
as you can see im looping using v but on line 6 it saids and im trying to figure out how I can get this i,v in pairs to loop and get to Classification
local weopon = game.ServerStorage.Inventory:FindFirstChild(v):Clone()
so that it syncs with
table.insert(Table,v:WaitForChild('Classification').Value)--insert whatever is found in the table
local DataStore = game:GetService("DataStoreService"):GetDataStore('ToolSave')--
game.Players.PlayerAdded:Connect(function(plr) --when the player is added to the game in the player properties
local savedstuff = DataStore:GetAsync(plr.userId)-- saved stuff variable means The Data of the player using userID
if savedstuff ~= nil then --if the data is not nil continue this script
for i,v in pairs(savedstuff) do --for i,v in pairs the Data Inventory
if game.ServerStorage.Inventory:FindFirstChild(v) ~= nil then --Try looop and try find the inventory and if its not nil then continue
local weopon = game.ServerStorage.Inventory:FindFirstChild(v):Clone() --if it isnt nil the clone it
weopon.Parent = plr:WaitForChild('Backpack')-- Puts this in the backpack
end
end
end
plr.CharacterRemoving:Connect(function()-- When character is being removed from the game
plr.Character.Humanoid:UnequipTools()-- Un equip the weopons
end)
end)
game.Players.PlayerRemoving:Connect(function(plr)-- when player is being removed
local Table = {}-- Creates a table
for i,v in pairs(plr.Backpack:GetChildren()) do-- for i,v in pairs loop around the backpacks childrens
table.insert(Table,v:WaitForChild('Classification').Value)--insert whatever is found in the table
end
if Table ~= nil then-- if table is not nil when the player leaves the game save the game
DataStore:SetAsync(plr.userId,Table)-- if it is not equal to nil then Set the Data to that using user iD and putting table into it
end
end)

2 comments
the first argument of FindFirstChild should be a string, not an object (line 7)
if v is a stringvalue just do v.Value