Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I clone everything inside a folder?

Asked by 6 years ago

This is similar to what I have:

local location = game.ServerStorage.Weapons:GetChildren() 
location:Clone().Parent = player.Backpack 

everytime I do this I always get an error saying 'attempt to call method 'Clone' (a nil value)' everything is in the folder, there is no reason for it to say that. Unless im doing something wrong...

Please help, I really do appreciate it!

1 answer

Log in to vote
0
Answered by
GingeyLol 338 Moderation Voter
6 years ago
Edited 6 years ago

'attempt to call method 'Clone' (a nil value)' exactly what it says

:Clone().Parent can only be used once.

Do

local location = game.ServerStorage.Weapons:GetChildren()
for i,weapons(location) do
weapons:Clone()
end
0
thank you very much! I havent realized that, than you again. shootthegame 14 — 6y
Ad

Answer this question