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

How do you change a TextLabel's Text to a Audio Name?

Asked by
TheePBHST 154
7 years ago

So, I was making a music player and wondered how do I change the TextLabel's Text into the Audio name.

Example: NowPlaying: "audioid"(Converts into AudioName)

What I am not talking about is like when the song is played in a certain cycle, that is not what I am doing. It's where people make requests and the TextLabel gets the AudioID to convert it to the AudioName.

1 answer

Log in to vote
3
Answered by
cabbler 1942 Moderation Voter
7 years ago

There is very simple catalog API to do this. You should use MarketplaceService, which has the useful function GetProductInfo. In example:

local songName = game:GetService('MarketplaceService'):GetProductInfo( tonumber(songId) ).Name

Good luck!

Ad

Answer this question