Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 4 years ago

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()     
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=" Aeroporia 37 — 4y
0
No, it says "Failed to load sound http://www.roblox.com/asset/?id=: Unable to download sound data" OwOShiba 78 — 4y
0
Do you have Discord? I can help you better there. GeneratedScript 740 — 4y
0
Well... Is the MsuicId text initially ":"? Shawnyg 4330 — 4y
0
Yes, I have discord, and no, it was not initially ":" OwOShiba 78 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

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.

Ad

Answer this question