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

why does music player won't play? [SOLVED]

I'm trying to make a music player but it doesn't work

this is the image of the gui formate: https://ibb.co/wSgydxD

script:

wait(1)
local link = "http://www.roblox.com/asset/?id="
local on = false
local music = Instance.new("Sound")
music.Name = "MusicGui"
music.Looped = true
music.Parent = script.Parent.Parent.Parent

script.Parent.TextBox.On.MouseButton1Click:connect(function()
	on = true
	music:Stop()
	music:Play()
end)
script.Parent.TextBox.Off.MouseButton1Click:connect(function()
	on = false
	music:Stop()
end)
script.Parent.Changed:connect(function()
	music:Stop()
	music.SoundId = link .. script.Parent.ID.Text
	if on == true then
		music:Play()
	end
end)

1 answer

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