I "made" a simple code to help music transition into different areas in my ROBLOX game.
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild('Humanoid') then
game.Players[hit.Parent.Name].PlayerGui.Sound1:Play()
game.Players[hit.Parent.Name].PlayerGui.Sound2:Stop()
end
end)
(The script is a normal Script object, and I tried using LocalScript)
and it works... sort of. When I walk through, it plays a nice song, and when I walk through it plays a different song, it works only in studio and not the actual game. I don't know if its a coding problem, or a script problem (I'm new to this stuff). Any help to this would be greatly appreciated!

2 comments
What's the output say online? Do you have FilteringEnabled on?
Yes, I do have filtering enabled, and the output says nothing.