Finding Marketplace Information from a Variable

Hey Developers!

I’m currently re-coding a music system, and I’m trying to get the information of a song from a variable called nextSong. However it is currently giving me this error. I’ll provide the error and the code below, any help would be appreciated :heart:

local MusicName = game:GetService("MarketplaceService"):GetProductInfo(tonumber(nextSong), 0).Name
image

"Argument 1 missing or nil", can you print nextSong and see if it is nil or not.

print(nextSong, tonumber(nextSong))

If it is nil then you made a mistake, basically you did not set the variable nextSong up correctly.

Turns out I was using my command wrong, but thank you for the help!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.