So I know how to play music when a block is touched but it fades the farther away I get. What I am trying to do is to change the background music once you reach a certain stage of my OBBY. I obviously am doing this wrong but don't know where to begin to fix it. This is what I have when touching a block.
local sound = script.Parent.Sound --The sound object to play script.Parent.Touched:connect(function(p) --When the parent part is touched local human = game.Players:GetPlayerFromCharacter(p.Parent) --Check touching part is part of a Player character if human and not sound.IsPlaying then --If player and the sound isn't already playing sound:Play() --Play the sound end end)
Any help would be appreciated. Thank you.