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

Catalog Music Player GUI won't work?

Asked by 10 years ago

I want to make it so when you click on a Button, it plays the most recent Audio made (By keyword 'Remix'. But it won't work

script.Parent.MouseButton1Down:connect(function()

    local h=game:service'HttpService'
local u="http://rproxy.tk/catalog/json?Keyword=Remix&Category=9&ResultsPerPage=1"
local tab=h:JSONDecode(h:GetAsync(u))
local asset=tab[1]
local sound=Instance.new("Sound",Workspace)
sound.SoundId="http://www.roblox.com/asset/?id="..tostring(asset.AssetId)
sound:Play()
print("Song is playing:"..tostring(asset.Name))

end)

Answer this question