#Get all items inside a folder from replicated storage and give them to the player
19 messages · Page 1 of 1 (latest)
yes, thank you! specifically clone them so other players can get it.
** You are now Level 4! **
-- The name of the folder you want to get items from
local folderName = "MyFolder"
-- The player you want to give the items to
local player = game.Players.LocalPlayer
-- Get the folder from ReplicatedStorage
local folder = game.ReplicatedStorage:FindFirstChild(folderName)
-- Check if the folder exists
if folder then
-- Loop through all the children in the folder
for _, item in ipairs(folder:GetChildren()) do
-- Clone the item and give it to the player
local newItem = item:Clone()
newItem.Parent = player.Backpack
end
else
warn("Folder " .. folderName .. " does not exist in ReplicatedStorage")
end
just replace the names with the folder u name it
*named
tysm!!
or just tell me the name of the folder so i can redo it
np
added a warninh
warning
at the end
if the folder doesn't exist
it will tell u
thank you again!