Okay, so my place has two songs in it. One is in a TV called HALO, and another one is in Workspace, called SONIC (not connected to a part or anything). I want the HALO sound to play when you step onto a brick, and the SONIC sound to stop playing. Bassically I made this script so that HALO only plays inside of a house I made (when you touch the part), and SONIC plays when your outside the house. Here's the script
function onTouch()
if game.Workspace.SONIC:Play() then
game.Workspace.SONIC:Stop()
wait(1)
game.Workspace.TV.Script.HALO:Play()
end
end
game.Workspace.MusicPlay:connect(onTouch)
So why doesn't this work? By the way, MusicPlay is the part that I want all of the scripts and stuff to be triggered by when you step on it.

1 comment
By the way, I'm just starting to use if then and while statements, so I'm kinda nooby at scripting. so sorry if none of this makes sense.