it should be giving me a tool but it errors what can i do to fix it? and how do you clone objects? my code:
local player = game:GetService("Players").LocalPlayer local button = script.Parent backpack = player.Backpack button.Activated:Connect(function() local char = player.Character local seat = char:WaitForChild("stuff"):WaitForChild("Tools") for i,backpack in pairs(script.Backpack:GetChildren()) do local c = backpack:Clone() c.Parent = LocalPlayer.Backpack end end)
Minor mistake, enjoy! :)
local plr = game.Players.LocalPlayer local back = plr.Backpack local button = script.Parent button.Activated:Connect(function() local char = plr.Character local Sytem = char:WaitForChild("stuff"):WaitForChild("Backpack") for _,v in pairs(script.Backpack:GetChildren()) do local c = System:Clone() c.Parent = back -- You didn't define "LocalPlayer" end end)