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

How could you access a model or audio's name through the object's id on roblox?

How could you access a model or audio's name through the object's id on roblox?

do i need httpservice?

2 answers

You would use the MarketplaceService.

Example code:

local Market=game:GetService("MarketplaceService")

function GetAssetName(AssetID)
	local ProductInfo=Market:GetProductInfo(AssetID,0)
	return ProductInfo.Name
end

2 comments

0

This works only if you are going to buy the model or audio. If you want to held out the audio this is the way to go. If you want to inport it into your game like a map system use mine.

2

@SporkyZ He's asking to get the name of the asset on the website, not the name of the content held within.

mine is kind of the way Dakota99 did his, but with less coding, it's easier to make it a variable like this:

local name = game:GetService("MarketplaceService"):GetProductInfo(ID HERE, 0).Name

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