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)
