I need help figuring out how to clone all the contents of a folder.
-
What do you want to achieve? I want to make a item saving system after buying an item in the shop.
-
What is the issue? I cannot figure out how to do this.
-
What solutions have you tried so far? I have done many google searches and Developer Forum searches.
Here is my code:
local ownedTools = script.Parent.Parent.OwnedTools
game:GetService("Players").PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local clonedTools = ownedTools.Children:Clone()
clonedTools.Parent = script.Parent.Parent.Backpack
end)
end)
I would also like to say that I am not good with for loops. I need to learn up!
Thank you if you can help!