Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Can you help me with my script? It wont play the music, it says the id is ":"

Whenever I press the play button(it's in a gui) it says " Failed to load sound rbxassetid://: Unable to download sound data"

local music = script.Parent.Parent.Parent.MusicId.Text
local sound = Instance.new("Sound")
		sound.Name = "Music"
	    sound.SoundId = "rbxassetid://"..music
		sound.Parent  = game.Workspace
		sound:play()     

5 comments

0

I'm not experienced with Sound and I'm assuming its some kind of radio tool. Anyway try replacing "rbxassetid://" with "http://www.roblox.com/asset/?id="

0

No, it says "Failed to load sound http://www.roblox.com/asset/?id=: Unable to download sound data"

0

Do you have Discord? I can help you better there.

0

Well... Is the MsuicId text initially ":"?

0

Yes, I have discord, and no, it was not initially ":"

1 answer

✓ Accepted answer

Got this solved on Discord. The issue was that you got the text once at the top of the script and assigned it to a variable. The variable doesn't update with the Text of the TextBox, so it would be the first text (which is blank), even when you click a button.

I also added a check for you so it doesn't spam creates 'Music' in workspace and has only one.

This discussion is preserved as it was. New answers, comments, and votes are closed.