I am trying to get this script to work but it is not for some reason. I cannot find the problem... Please see the script below:
local Button = script.Parent function Clicked() local Frame = script.Parent.Parent.Parent local a = script.Parent.Parent.AudioIDInsert.Text local b = script.Parent.Parent.Parent.Parent.MusicForPlayers wait(0.1) b:Pause() b.Volume = 1 wait(0.1) b.SoundId="http://www.roblox.com/asset/?id=" .. a wait(0.1) b:Play() wait(0.1) Frame:Destroy() end Button.MouseButton1Click:connect(Clicked)
Thanks to all those who are making an attempt to help.
It looks like the sound is parented inside the frame? Wait for the sound to finish playing with b.IsPlaying
before destroying.