18:42:07.786 - Argument 1 missing or nil 18:42:07.789 - Stack Begin 18:42:07.789 - Script 'ReplicatedFirst.GuiGearGiverSCRIPT', Line 13
local playergui = game.Players.LocalPlayer:WaitForChild("PlayerGui") playergui.ScreenGui2.Frame.Button.MouseButton1Click:connect(function(click) game.Players.LocalPlayer.PlayerGui.ScreenGui2.Enabled = false local id= game.Players.LocalPlayer.PlayerGui.ScreenGui2.Frame.ID.Text local backpack = game.Players.LocalPlayer.Backpack local gearId = tonumber(id) local root = game:GetService("InsertService"):LoadAsset(gearId) root.Name = "InsertedObject" .. gearId root.Parent= backpack
For God sakes, the argument is empty, you need to insert the gear id inside it.
EDIT
If you can't understand crap, learn.
local plr = game.Players.LocalPlayer local plrGui = plr:WaitForChild("PlayerGui") local screenGui = plrGui.ScreenGui2 local id = screenGui.Frame.ID.Text local backpack = plr.Backpack local gearId = id while wait(0.2) do local root = game:GetService("InsertService"):LoadAsset(gearId) root.Name = gearId root.Parent = backpack end