So I am making a TextButton, when you press it, a party comes on and there's dubstep music and fireworks and a dance floor and all that stuff. There is another textbutton, when you click that, it removes it all. Here is the localscript:
function onClicked()
local dancefloor = workspace:FindFirstChild('DanceFloor')
if dancefloor ~= nil then dancefloor:Destroy()
local colorcorrect = game.Lighting:FindFirstChild('ColorCorrection')
if colorcorrect ~= nil then colorcorrect:Destroy()
local hint = workspace:FindFirstChild('Message')
if hint ~= nil then hint:Destroy()
local gui = game.StarterGui:FindFirstChild('IlluminatiGui')
if gui ~= nil then gui:Destroy()
local sound = workspace:FindFirstChild('Dubstep')
if sound ~= nil then sound:Destroy()
end
end
end
end
end
end
script.Parent.MouseButton1Down:connect(onClicked)
So all of the other stuff gets removed, however the Dubstep sound stays there. So really, this is the line of code I'm worried about
local sound = workspace:FindFirstChild('Dubstep')
if sound ~= nil then sound:Destroy()
Yes, it is in Workspace. Yes, it works if I put the same line in the command bar. Yes, I am certain this works in both the game and studio. What's wrong with this script? Please help!

4 comments
I put all the ends at the bottom of the script. Is this really the problem?
omigosh I am such an idiot. Thank you so much!
Well, if dancefloor doesn't exist, then nothing will happen. Consequently if colorcorrect doesn't exist, then nothing after that will happen. It may be your problem. Also with sounds, you'd need to do Sound:Stop() before you destroy it.
Or it may continue.