I made this script which downloads information on the 10 latest sounds that Monstercat uploaded to Roblox, and then creates a playlist using them.
It creates the sounds using the Id and the Name received from the HTTP request. They get parented like they should, and the loop goes through them normally as well. I can print the sounds’ progress and they progress normally, but it just isn’t playing the sounds.
Their SoundGroup property is also set to a SoundGroup named Sounds parented to SoundService. There isn’t any error in the output.
local HttpService = game:GetService("HttpService")
local SoundService = game:GetService("SoundService")
local sounds = workspace.Sounds
local requestUrl = "https://inventory.rprxy.xyz/v2/users/1750384777/inventory/3?limit=10&sortOrder=Asc"
local soundTemplate = Instance.new("Sound")
soundTemplate.SoundId = "rbxassetid://"
soundTemplate.SoundGroup = SoundService:WaitForChild("Sounds")
soundTemplate.EmitterSize = 1e3
soundTemplate.Volume = 1
local success, result = xpcall(function()
return HttpService:JSONDecode(HttpService:GetAsync(requestUrl))
end, function(error_)
warn(error_)
coroutine.yield()
end)
local playlist = table.create(10) --// amount of sounds in the link
for _, item in ipairs(result.data) do
local sound = soundTemplate:Clone()
sound.SoundId ..= item.assetId
sound.Name = item.assetName
sound.Archivable = false
sound.Parent = sounds
table.insert(playlist, sound)
end
while true do
local index, currentSound = next(playlist)
currentSound:Play()
currentSound.Ended:Wait()
table.insert(playlist, table.remove(playlist, index))
end
--// thanks for stopping by
i’ll try this, but I don’t think it’ll make a difference as the sounds are loading properly - i can print the names and the id and it works correctly, but they don’t play
this also isn’t working. I tried sending the table playlist to the client using a remoteevent, and I also tried playing the sounds parented to workspace directly. They both say they’re playing, but they don’t actually play, just like the server.
This sounds silly, but try to increase your in game volume up when you play test. Sometimes I do not notice this and it ends up “appearing” to not play.
your solution worked, i made such a silly mistake lol
it was being set to bxassetid://number instead of rbxassetid://number. I guess I must’ve fixed it when I posted it here but i forgot to fix it in the script itself.
It works, thanks for helping everyone
i wish this errored so I could’ve figured this out sooner, but it just silently failed