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

Retrieve gear from gear id in roblox catalog?

Asked by
stepatron 103
5 years ago
Edited 5 years ago

How would you have a player get gear from the roblox catalog? Is it something like

local itemId = "rbxassetid://123456789"

player.Backpack:GiveItem(itemId)
0
Remove the bracket in line 1. The bracket at the end. Remove it. User#19524 175 — 5y

2 answers

Log in to vote
0
Answered by
Griffi0n 315 Moderation Voter
5 years ago
Edited 5 years ago

Here you go

local InsertService = game:GetService("InsertService")

local GiveItem = function(Player, AssetId)
    local Gear = InsertService:LoadAsset(AssetId):GetChildren()[1]
    local Backpack = Player:WaitForChild("Backpack")
    Gear.Parent = Backpack
    InsertService:ClearAllChildren()
end

-- Example
GiveItem(player, 212641536)
Ad
Log in to vote
-3
Answered by 5 years ago

No, but you can go in the Toolbox and find ROBLOX gear from there.

0
Im just trying to use this for a gear gui stepatron 103 — 5y

Answer this question