Hi I have a script to play some music with a GUI but it doesn't work I dont know why?
wait(8)
sound = Instance.new("Sound")
sound.Volume=1
sound.Pitch=1
sound.Name=""
sound.Looped=true
sound.PlayOnRemove=false
player = script.Parent.Parent.Parent.Parent
sound.Parent = player.Radio
Format = "http://www.roblox.com/asset/?id=##ID##"
frame = script.Parent:WaitForChild("Frame")
frame:WaitForChild("Play").MouseButton1Click:connect(function()
local input = tonumber(frame:WaitForChild("Input").Text)
if input then
sound:Stop()
sound.SoundId=Format:gsub("##ID##", tostring(input))
sound:Play()
end
end)
frame:WaitForChild("Stop").MouseButton1Click:connect(function()
sound:Stop()
end)
Thanks if you can help c:

2 comments
connect is deprecated use Connect, and do not get the player with tons of parents. Use LocalPlayer! and always use local variables
i suspect line 17 and 10, on line 17 you should try using string.gsub instead of (string):gsub,on line 10 you should try using rbxasset:// instead of http://www.roblox.com/asset/?id=