How do you go about saving the names of items in your Backpack to a table?
Well, you had no go at it at all yourself so I won't explain it at all. It will require changing to fit your needs...
ds = game:GetService("DataStoreService"):GetDataStore("Tools") ds:SetAsync(game.Players.Player1.userId,game.Players.Player1.Backpack:GetChildren())
To retrieve the data store:
ds = game:GetService("DataStoreService"):GetDataStore("Tools") tools = ds:GetAsync(game.Players.Player1.userId)
Iterate
local names = {}; for k,v in next, Player.Backpack:GetChildren() do names[k] = v.Name; end; DS:SetAsync(Key, names)
Assumes DS
and Player
are predefined as the DataStore and Player respectively.
Also assumes that Key
is predefined.
Closed as Not Constructive by Perci1 and General_Scripter
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?