of     1   

Inspectial
#141294017Wednesday, July 23, 2014 6:30 PM GMT

line 11, clone is a nil value? wot? toolnames = {"hopp1","hopp2","hopp3"} lighting = game.Lighting game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) wait(1) for i=1, #toolnames do for _,v in pairs(lighting:GetChildren()) do randomchosen = toolnames[math.random(1,#toolnames)] wait(0.1) local clone = randomchosen:Clone() clone.Parent = player.Backpack end end end) end)
HuntHello
#141294135Wednesday, July 23, 2014 6:32 PM GMT

I'm pretty sure you just cloned text.
FlamedSkull
#141294156Wednesday, July 23, 2014 6:32 PM GMT

have to be object instances.. not strings.
HuntHello
#141294317Wednesday, July 23, 2014 6:34 PM GMT

After: tool randomtool defined value rndtool = game.Lighting:FindFirstChild(randomchosen) local clone = rndtool:clone()
Inspectial
#141294361Wednesday, July 23, 2014 6:35 PM GMT

thx, i fixed it.. but it gives me all 3 kinds & it gives me like 10 of them?? i only want one. toolnames = {game.Lighting.hopp1,game.Lighting.hopp2,game.Lighting.hopp3} lighting = game.Lighting game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) wait(1) for i=0, #toolnames do for _,v in pairs(lighting:GetChildren()) do randomchosen = toolnames[math.random(1,#toolnames)] wait(0.1) local clone = randomchosen:Clone() clone.Parent = player.Backpack end end end) end)
Inspectial
#141294456Wednesday, July 23, 2014 6:36 PM GMT

@Hunt, thanks that works, but still the same problem as before gives a ton :c toolnames = {"hopp1","hopp2","hopp3"} lighting = game.Lighting game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) wait(1) for i=0, #toolnames do for _,v in pairs(lighting:GetChildren()) do randomchosen = toolnames[math.random(1,#toolnames)] rndtool = game.Lighting:FindFirstChild(randomchosen) wait(0.1) local clone = rndtool:Clone() clone.Parent = player.Backpack end end end) end)
HuntHello
#141294609Wednesday, July 23, 2014 6:38 PM GMT

If you look closely, you put the cloning into backpack in the same scope as the for loop, effectively cloning the amount of tools in lighting (but randomly picked) into your backpack...
HuntHello
#141294715Wednesday, July 23, 2014 6:39 PM GMT

--try this toolnames = {"hopp1","hopp2","hopp3"} lighting = game.Lighting game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) wait(1) randomchosen = toolnames[math.random(1,#toolnames)] rndtool = game.Lighting:FindFirstChild(randomchosen) wait(0.1) local clone = rndtool:Clone() clone.Parent = player.Backpack end) end)
Inspectial
#141294746Wednesday, July 23, 2014 6:39 PM GMT

@Hunt thanks it works :D toolnames = {"hopp1","hopp2","hopp3"} lighting = game.Lighting game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) wait(1) for i=0, #toolnames do for _,v in pairs(lighting:GetChildren()) do randomchosen = toolnames[math.random(1,#toolnames)] rndtool = game.Lighting:FindFirstChild(randomchosen) wait(0.1) end end local clone = rndtool:Clone() clone.Parent = player.Backpack end) end)

    of     1