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???

1function GetInfo(assetId)
2m = game:GetService("MarketplaceService"):GetProductInfo(assetId)
3for i,v in pairs(m) do
4    script.Parent.Text = (m['Name'])
5    end
6end
7 
8GetInfo(script.Parent.Parent.ScrollingFrame.Sound.SoundId)

1 answer

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

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

Ad

Answer this question