For instance, I am trying to make an addition in my script where I play a sound id, There will be a GUI at the top of the screen where it says the name of the song, and the Id of the song.. I can't find out any ways, it's getting frustrating.
Example
CreateMessage("Now playing; " .. Asset.Name .. " - " .. Asset.Id)
Help?
Thanks...
If you use a Sound instance and name the relative sound with the respective sound asset and name you can do
local sound = // CreateMessage("Now playing; ".. sound.Name .. " - " .. sound.SoundId
Using MarketplaceService
:GetProductInfo
.
GetProductInfo returns a table of the information of the asset provided. It's really easy to use;
function getInfo(id) local info=game:GetService("MarketplaceService"):GetProductInfo(id) return info end
Now, all you have to do is call the function with the ID to get the info (like this);
player.Chatted:connect(function(msg) local info=getInfo(msg) print(info.Name.."\n"..info.Description) --[[ in the output; Doge Very hat. Such doge. Wow. ]]-- end)