A while back I asked a question on how I could save a Player's backpack items, and people suggested that I inserted them into a String. The only problem is that I have no idea how to use Strings at all. I tried reading the Wiki, but the Wiki's string article is just confusing, and explains the useless things as opposed to things like this. Thanks!
COMMUNITY QUESTION
How does one insert Backpack items into a string?
1 answer
To insert something into a string, I'm assuming that you are looking for a method of storing the names of the tools a player had into a string so they can load them up again.
I like to use Data Persistence because the ROBLOX wiki has a fairly poor explanation of how DataStores work.
You would do this like so: (Not tested)
game.Players.PlayerRemoving:connect(function(player) -- When a player leaves the game
tools = player.Backpack:GetChildren()
for i = 1, #tools do -- Getting all the tools in their backpack
player:SaveString("Tool"..i, v.Name) -- Saving the name of the tool
for i,v in pairs(player.Character:GetChildren()) do
if v:IsA("Tool") then -- Getting tool in character if there is one
player:SaveString("Tool"..i+1,v.Name) -- Saving the name of the tool
end
end
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

8 comments
I know what a String is, I just don't know how to insert things into a String.
You said you didn't know how to use strings.
I don't know how to use them at an advanced level, I completely understand what you explained.
Does my solution work?
I have no way to test it. How would I use your way to also load the player's backpack back in when the join?
Want me to post the whole script?
Yes, that would be lovely.
Oh, and if you add it, add it in a new answer please, so I get it in my notifications.