Failed to load sound : Unable to download sound data

local SongID = script.Parent.Main.SongBox.Song_ID
local Pause = script.Parent.Main.Pause
local Play = script.Parent.Main.Play
local plr = game.Players.LocalPlayer

Play.MouseButton1Click:Connect(function()
	local newSong = Instance.new("Sound")
	newSong.Name = "Song"
	wait(1)
	newSong.SoundId = tonumber(SongID.Text)
	wait(1)
	newSong.Parent = plr.PlayerGui
	wait(1)
	newSong:Play()
	print("playing")
end)

it keeps saying :arrow_forward: Failed to load sound : Unable to download sound data

1 Like

Is this sound owned by you, or the group that owns the game you’re trying to use it in?
If the sound is not public, you won’t be able to use it.

2 Likes

It’s owned by someone in the Audio library

1 Like

Sound Id must be in this format:

"rbxassetid://12341234"

or

"http://www.roblox.com/asset/?id=12341234"

Looks like you’re doing this:

newSong.SoundId = tonumber(SongID.Text)

which I believe is providing just a number.

While it’s true that Lua can accept numbers in place of strings and vice versa in some situations, it doesn’t apply to every aspect of the Roblox engine, and I believe object properties are one such case.

5 Likes

<3 Tysm it worked i appreciate your help

1 Like