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

How to get Music name from ID?

Asked by 9 years ago

Hey, I'm making a jukebox GUI. I have the music player set up but IDK how to get the music name eg... http://web.roblox.com/ROBLOX-Theme-10-sec-item?id=130768805 You would type in 130768805 hit play and it would say Now playing: ROBLOX Theme (10 sec)

1 answer

Log in to vote
2
Answered by 9 years ago

You can use Market place Service to do that, the following script will print out the name from the id

local SoundId = 130768805  -- Sound Id Of The Sound
local Asset = game:GetService("MarketplaceService"):GetProductInfo(SoundId) --[[Get's Product Information Of The Sound--]]
print(Asset.Name) --Print's The Name Of The Audio
0
Explain how it works, else you'll get -6 from Perci1 iNicklas 215 — 9y
0
Assuming this works, You'll end up creating a Message/Hint/Gui with Text = Asset.Name alphawolvess 1784 — 9y
0
Yes, just the first two lines are important if you want to read more about what I used you can use the wiki page: http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService/GetProductInfo (PM Z9R if you need more help please put this code in the message: 7185 for I to know what you are talking about) GuiHelperSince2014 70 — 9y
0
Thanks, it works TayIorRobinson 20 — 9y
Ad

Answer this question