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

How can I make the audio's SoundId change? [CLOSED]

My friend already fixed this for me c:

guis = game.Workspace.Radio.Gui.Frame.Sound
sound = game.Workspace.Radio.Sound
Format = "http://www.roblox.com/asset/?id=##ID##"
local frame = script.Parent:WaitForChild("Frame")
function onClick()
	frame:WaitForChild("Close").MouseButton1Click:connect(function()
	script.Parent.Parent.Parent.Frame.Visible = false
	sound.SoundId = Format..guis.Text
	end)
	local input = tonumber(frame.Input.Gui.Sound.Frame:WaitForChild("Sound").Text)
	if input then
	sound.SoundId=Format:gsub("##ID##", tostring(input))
	end
	end
script.Parent.MouseButton1Up:connect(onClick)

I had this problem and wasn't able to solve this. When I get the gui, It and enter it, the gui won't disappear and won't change the audio. Please help!

1 answer

Well, I don't know why it won't change the sound, but I know why the gui won't disappear, You ain't a added a Remove event, so add this: script.Parent:Destroy()

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