If the player kills the NPC, it crashes

Hi, the error message shows the call stack leading to the crash. So in your case the problem is in OLGameMode.cpp in line 35. So you very likely try to run something on a nullptr in that line.

From skipping through your code below, there is at least one issue that will lead to a crash. In the OLGameMode::DeadCheck if the Character is not a AOLCharacterPlayer but an AOLNPCBasic, the code will crash, since Player will be nullptr and you then later in the else if Character == NPC branch do: Player → GetController() which will crash since Player is a nullptr at that point.