PlayAnimation function is not working

from what i see you have some code that force “animation mode” to “UseAnimationBlueprint”

is you use animation blueprint for your unit, consider using animation montage and use " YourMesh->AnimScriptInstance->Montage_Play" function