As the title says, I am having trouble with a .Changed event not connecting after a player has died/reset.
local player =game:WaitForChild("Players").LocalPlayer
player.Character.Sound.Changed:Connect(function()
if player.Character.Sound.Playing == true then
--Do my code
end
end)
local player = game:WaitForChild("Players").LocalPlayer
local function connectCharacter(character)
character.Sound.Changed:Connect(function()
if character.Sound.Playing == true then
--Do my code
end
end)
end
player.CharacterAdded:Connect(connectCharacter)
local character = player.Character
if character then
connectCharacter(character)
end