ok so im trying to make a script that clones everything from a folder and put it into a players backpack any ideas?
✓ ANSWER ACCEPTED
how to move everything from one folder the player backpack?
1 answer
✓ Accepted answer
You can use a generic for loop to iterate through your folder's descendants, then set the Parent property of each object to the Player's backpack.
local folder = game.ReplicatedStorage.Tools --Folder
for _,v in next,folder:GetChildren() do --Generic for
v.Parent = game.Players.Player.Backpack --Set the parent
end
1 comment
0
worked great thanks!
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
@goulstem but what if i just decsied to add like 2-3 more items to that folder then i would have to go to my script and add those adds i want to make my script to find the items in the folder and then clone those items