Unreal engine crashing when player attacks enemy entity while being attacked

I had multiple AI entities that attacks on sight of the player. If the player attacks the AI from behind, the engine runs normally. However, if I attack the AI while it is able to attack me, the engine crashes. I’ve tried restarting the engine multiple times, and every attempt results in the same error log as shown below. I couldn’t pin point what was wrong.

LoginId:efac494a48dab738f758b6bdc4335900
EpicAccountId:182743a9bd1d4c37b23f67025529f83c

Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 771] Array index out of bounds: 0 from an array of size 0

UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_Engine
UnrealEditor_AIModule
UnrealEditor_AIModule
UnrealEditor_AIModule
UnrealEditor_AIModule
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
kernel32
ntdll

BP_ThirdPersonCharacter.T3D (408.8 KB)
BP_EnemyAI.T3D (253.5 KB)