I want to make a game where the music is different in each area. Like a button that plays a specific song when you step on it. I had it working but the songs overlapped. Can anybody tell me how to make this button?
function onTouched(hit) script.Parent.Music:play() end wait (1) script.Parent.Touched:connect(onTouched)
script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild('Humanoid')then game.Players[hit.Parent.Name].PlayerGui.Track2:Stop() game.Players[hit.Parent.Name].PlayerGui.Track1.Volume=1 game.Players[hit.Parent.Name].PlayerGui.Track1:Play() end end)