How could you access a model or audio's name through the object's id on roblox?
do i need httpservice?
How could you access a model or audio's name through the object's id on roblox?
do i need httpservice?
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
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.
2 comments
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.
@SporkyZ He's asking to get the name of the asset on the website, not the name of the content held within.