Why does part 1 have touch interest but not part 2 I'm really confused?
local sound1 = game.ServerStorage.Sound1
local sound2 = game.ServerStorage.Sound2
local p1 = script.Parent.Part1
local p2 = script.Parent.Part2
local a = sound1:Clone()
debounce = false
p1.Touched:connect(function(part)
if p1.Parent and game.Players:playerFromCharacter(part.Parent) then
local player = game.Players:playerFromCharacter(part.Parent)
if debounce == true then
if player.Character.Head:findFirstChild("Sound2") then
player.Character.Head.Sound2:Destroy()
else
end
elseif debounce == false then
local a = sound1:Clone()
a.Parent = player.Character.Head
a:Play()
debounce = true
end
p2.Touched:connect(function(part)
if p2.Parent and game.Players:playerFromCharacter(part.Parent) then
local player = game.Players:playerFromCharacter(part.Parent)
if debounce == true then
if player.Character.Head:findFirstChild("Sound2") then
player.Character.Head.Sound2:Destroy()
else
end
elseif debounce == false then
local a = sound2:Clone()
a.Parent = player.Character.Head
a:Play()
debounce = true
end
end
end)
end
end)

2 comments
use GetPlayerFromCharacter instead of playerFromCharacter. I believe that should fix it.
That's completely irrelevant, actually, although
playerFromCharacteris deprecated.