Players.PlayerAdded:Connect(function(Player)
local Connections = {}
Player.CharacterAppearanceLoaded:Connect(function(Character)
for _, v in pairs(Connections) do
if v then
v:Disconnect()
end
end
Connections["Humanoid_Died"] = Character.Humanoid.Died:Connect(function()
-- Do something
end)
end)
When a ‘Humanoid’ dies it is destroyed (the time between it dying and it being destroyed being determined by the ‘Players.RespawnTime’ property). When a ‘Humanoid’ instance is destroyed any connections made from it are subsequently disconnected.
You can, though it really only becomes a problem when it’s constantly being looped. You’d be fine without it, but it won’t affect anything if you do have it.