Ok. Lets assume I have a text box, named IdNumber and a text button, named Enter. (The rest is explained in the script.) Why doesn't it work? - ERROR(18:35:13.054 - httpGet http://roblox.com/asset/?id=Enter In ID(Numbers Only) failed. Trying again. Error: HTTP 400 (Input string was not in a correct format.). Elapsed time: 0.124959) SCRIPT:
Enter = script.Parent.Enter
preloadurl = "http://roblox.com/asset/?id="
local IDNumber = script.Parent.IdNumber.Text
songnumber = 0
Enter.MouseButton1Down:connect(function(clicked)
local Music = Instance.new("Sound")
songnumber = songnumber + 1
Music.Parent = script.Parent
Music.SoundId = preloadurl .. IDNumber
Music:Play()
Music.Name = "Song #" .. songnumber
end)

2 comments
The end on line 12 is not needed.
That is not true, the end is needed for line 5.