i wanna make if error "Unable to download sound data" appears in console then my sound delete
local Event = game:GetService("ReplicatedStorage").Event Event.PlaySound.OnServerEvent:Connect(function(Player, AssetId, Volume, Pitch) local Sound = instance.new("Sound") Sound.Parent = Player.Character.Radio Sound.Name = "Music" Sound.Volume = Volume or 0.5 Sound.Pitch = Pitch or 0.5 if typeof(AssetId) == "table" then Sound.SoundId = "http://www.roblox.com/asset/?id="..AssetId[math.random(1,#AssetId)] else Sound.SoundId = "http://www.roblox.com/asset/?id="..AssetId end Sound:Play() end)
Event.Radio.PlaySound.OnServerEvent:Connect(function(Player, AssetId) local Sound = Player.Character.Radio.Music if typeof(AssetId) == "table" then Sound.SoundId = "http://www.roblox.com/asset/?id="..AssetId[math.random(1,#AssetId)] else Sound.SoundId = "http://www.roblox.com/asset/?id="..AssetId end Sound:Play() end)
the error does not appear because I already added assetid to the existing sound