Alright, I know this should better be at the Bug report channel, but due to Roblox removing any possible chance to rank up to Regular, I’m forced to write it here.
-
What do you want to achieve?
I coded a music player that loads in music and plays it. I am completely 100% sure that the code is working since 50% of the songs I put in work. -
What is the issue?
Well, the other 50% don’t work. They all come with the error message
Failed to load sound _____________: error code 46
Both when I try playing it in game with a script, and when I put it manually inside a Sound emitter.
Here’s the script that plays the music if anyone is interested.
local MusicList = require(game.ServerScriptService.MusicList)
local Debounce = falsescript.Parent.ClickDetector.MouseClick:Connect(function(Player)
if not Debounce then
Debounce = true
local MainFrame = Player.PlayerGui.MusicGui.MainFrameMainFrame.ScrollingFrame:ClearAllChildren() for i,Table in pairs(MusicList) do local NewTemp = MainFrame.Template:Clone() NewTemp.Parent = MainFrame.ScrollingFrame NewTemp.Text = Table[1] NewTemp.Artist.Text = Table[2] NewTemp.ID.Value = Table[3] NewTemp.Position = UDim2.new(0,0,0,(i - 1) * 50) NewTemp.Visible = true end local ScrollerSize = #MainFrame.ScrollingFrame:GetChildren() * 50 MainFrame.ScrollingFrame.CanvasSize = UDim2.new(0,0,0,ScrollerSize) MainFrame.Parent.LocalScript.Emitter.Value = script.Parent.AudioEmitter MainFrame.Visible = false MainFrame.Visible = true wait(.5) Debounce = false
end
end)
- What solutions have you tried so far?
I’ve tried putting in many other audios to see if they work. Among them was this one
However it’s not the only one. You can see that if you try to play this song in the website, you can hear it perfectly fine, meaning Roblox hasn’t removed it. But it also doesn’t play in game.
If anyone has knowledge of what ‘error code 46’ is, I’m all ears to hear!