Do I need to disconnect these?

I’m wondering if I should disconnect these events or if it disconnects automatically when the object is removed.

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		local humanoid = character:WaitForChild("Humanoid")

		humanoid.Died:Connect(function() -- do i?
			OnDied()
		end)
	end)
end)

They’ll automatically be cleaned up when those objects are destroyed.

1 Like

I think it disconnects automatically because the humanoid is gone so it cant check again.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.