In a tournament game I have, when a map loads a song will play. The song starts just fine when the map is cloned and put in the workspace, however when the round ends and the map is removed the song continues to play. How can I fix this? I'm still fairly new to Lua.
Here's the script inside the sound.
local song = script.Parent
local Map = script.Parent.Parent
if map.Parent == game.Workspace then
song:Play()
else
song:Stop()
end

2 comments
So, I used this script, and it works just fine in studio mode, however the music doesn't even start in a server.
Search the wiki for the Preload method. Use it to preload the song, so that it will play the first time you Play() it, rather than load.