Character freezing when playing animation montage [C++]

Hi, I searched quite a bit and can’t find the solution to my specific problem.

When I trigger animation montage the character just freezes for the length of the animation and then plays the idle montage again. It plays the idle animation sped up a bit for a short period like it’s trying to catch up. I’m using the 3d side scroller starter content.

I’ve setup a Animation blueprint (inheriting from AnimInstance) with the default slot connected up to the Final Animation Pose block.

In code, in my .h:

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Anim)
UAnimMontage *DeathAnimPtr;

.cpp

Contructor:

 static ConstructorHelpers::FObjectFinder<UAnimMontage>DeathMontageObj(TEXT("AnimMontage'/Game/Mannequin/Animations/DeathMontage.DeathMontage'"));
    
DeathAnimPtr= DeathMontageObj.Object;

Then I call the my PlayMontage function which has the following:

USkeletalMeshComponent *SwordsManCharacterMesh = this->GetMesh();
UAnimInstance * AnimInst;

if (SwordsManCharacterMesh != nullptr)
	AnimInst = SwordsManCharacterMesh->GetAnimInstance();
else
	AnimInst = nullptr;
if (AnimMontage && AnimInst)
{
		
	float const Duration = AnimInst->Montage_Play(AnimMontage, InPlayRate);
}
return 0.f;

I pass in the arguments of the DeathAnimPtr, a timer value I’ve setup that uses the Tick Delta time and NAME_None.

Any ideas where I’m going wrong?

Thanks