Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

how to move everything from one folder the player backpack?

ok so im trying to make a script that clones everything from a folder and put it into a players backpack any ideas?

1 comment

0

@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

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.