What do you want to achieve? Keep it simple and clear!
Touched part to at least plays the sound again on a player death
What is the issue?
when I die the audio in full game goes into mute mode, or gets disabled…
the script I use that handles touched parts to play audio on a touched part
local LocalPlayer = game:GetService('Players').LocalPlayer
local character = LocalPlayer.Character or LocalPlayer.CharacterAdded:wait()
local HumanoidRootPart = character:WaitForChild('HumanoidRootPart')
local PlayerGui = LocalPlayer.PlayerGui
local currentPlayingSong = nil
LocalPlayer.Character.HumanoidRootPart.Touched:Connect(function(hit)
if hit.Name == ("SoundPart") then
local foundSong = PlayerGui.Audio[hit.Sound.Value]
if currentPlayingSong ~= nil and foundSong ~= currentPlayingSong then
currentPlayingSong:Stop()
end
if foundSong ~= nil and foundSong ~= currentPlayingSong then
currentPlayingSong = foundSong
currentPlayingSong:Play()
end
end