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

GetInfo with a SoundId?

Asked by
NotSoNorm 777 Moderation Voter
10 years ago

Help! I'm trying to get the title from the SoundId in my model, Whats wrong???

function GetInfo(assetId)
m = game:GetService("MarketplaceService"):GetProductInfo(assetId)
for i,v in pairs(m) do
    script.Parent.Text = (m['Name'])
    end
end

GetInfo(script.Parent.Parent.ScrollingFrame.Sound.SoundId)

1 answer

Log in to vote
1
Answered by
Nickoakz 231 Moderation Voter
10 years ago
function GetInfo(assetId)
    m = game:GetService("MarketplaceService"):GetProductInfo(assetId)
    script.Parent.Text=m.Name
end
GetInfo(script.Parent.Parent.ScrollingFrame.Sound.SoundId)

When you request a id from the GetInfo, it returns a table. {"Name"="Blah"}

Ad

Answer this question