Go to the BP_ChatPanel and create a new function called CullMessage.

Then create a new variable called UseMessageCulling and set it to a Boolean variable type then set its default value to True.

Create another variable called MaxMessages and set it to Integer variable type and set its default value to 1000.

Add the highlighted nodes shown in the image below, location at the top of the image.