Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Retrieve gear from gear id in roblox catalog?

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

local itemId = "rbxassetid://123456789"

player.Backpack:GiveItem(itemId)

1 comment

0

Remove the bracket in line 1. The bracket at the end. Remove it.

2 answers

✓ Accepted answer

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)

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

1 comment

0

Im just trying to use this for a gear gui

This discussion is preserved as it was. New answers, comments, and votes are closed.