✓ Accepted answer
It would be easier to start with an empty table and insert the names of the items first and then clone them and put them into workspace.
ServerScript inside of ServerScriptService
local items = {}
local loadPlace = game:GetService("Workspace")
local folder = game:GetService("ServerStorage"):WaitForChild("Folder")
wait(2.5)
for _,item in pairs(folder:GetChildren()) do
table.insert(items,item.Name)
wait()
end
wait(1)
for _,item in pairs(items) do
local newItem = folder:FindFirstChild(item):Clone()
newItem.Parent = game:GetService(loadPlace)
print("Loaded "..item.." Into "..loadPlace)
wait()
end
- Created an empty table to store all the values
- Set all easy changeable variables
- Inserted all the names of the items inside the folders in ServerStorage into the table
- Looked for the name of the item in the folder in ServerStorage and cloned it into workspace
Hope this helped! If it didn't work, let me know by commenting down below what error occurs. If it does work, let me know by taking this as the answer!
~killerbrenden
6 comments
But it all depends on how you do it and what you want to do with it.
Thank you.
No problem!
Well I dont get any errors but it doesn't clone them :(
Nvm, the problem is at line 25, instead of game:GetService(loadPlace) just type loadPlace
Glad to help.