Hi, thank you for reading. What I'm trying to do here is to clone an object, called Wood, and another object called Foil, into the workspace if there is nothing in workspace called Wood or Foil. The thing is that it only identifies Wood. I want to make a list of things that will be cloned into the workspace if it's not in the workspace.
local Loot = game.Lighting.Loot:GetChildren()
local Name = ("Wood"),("Foil")
while wait(.1) do
if not game.Workspace:findFirstChild(Name) then
for i = 1, #Loot do
if Loot[i] and Loot[i].Name == Name then
local Add = Loot[i]:Clone()
Add.Parent = game.Workspace
if game.Workspace.Part then
Part = workspace.Part
Add:MoveTo(Part.Position)
end
end
end
end
end
