local audios = script.Parent
wait(5)
game.Workspace["Driving in car interior"]:Play()
IDs = {audios.AlongTheWatchTower, audios.BasketCase, audios.BlueSky, audios.CivilWar, audios.ClearlyNow, audios.ParadiseCity, audios.SeenTheRain, audios.Someday, audios.Starman, audios.TakeOnMe, audios.WhenIComeAround, audios.HighwayToHell, audios.EveryBodyWantsToRuleTheWorld, audios.ForWhatItsWorth, audios.Revolution, audios.OutOfTouch}
while true do
local rnd = math.random(1,#IDs)
for i = 1, #IDs do
if i == #IDs then
IDs[rnd]:Play()
print(IDs[rnd])
local id = tonumber(IDs[rnd].SoundId)
local asset = game:GetService("MarketplaceService"):GetProductInfo(id)
print(asset.Name)
end
end
wait(IDs[rnd].TimeLength/IDs[rnd].PlaybackSpeed)
print(IDs[rnd].TimeLength)
end
Hi, I have written a script to play a random audio from the table above but I cant seem to get it printing the name of the asset into the console, anyone know why?

2 comments
I get an error when I try and implement that code, "match is not a valid member of Sound"
Apologies, I made a rookie mistake, I've edited the code!