# Code not Working no errors

**URL:** <https://forums.unrealengine.com/t/code-not-working-no-errors/1954929>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [July 29, 2024, 11:25pm UTC](https://forums.unrealengine.com/t/code-not-working-no-errors/1954929 "2024-07-29T23:25:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fronteqjr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fronteqjr](https://forums.unrealengine.com/u/Fronteqjr)\
**Post date:** [July 29, 2024, 11:25pm UTC](https://forums.unrealengine.com/t/code-not-working-no-errors/1954929/1 "2024-07-29T23:25:04Z")

</div>

If (PlayerDevice.PlayerIsBlocking = true) Statement not working

PlayAttackAnimation(animation\_controller: play\_animation\_controller, attack\_anim: animation\_sequence, Target: fort\_character, Damage : float, NPCChar : fort\_character):void=  
animation\_instance := animation\_controller.Play(attack\_anim)  
animation\_controller.Play(attack\_anim)  
Sleep(0.33)  
if (Distance(NPCChar.GetTransform().Translation, Target.GetTransform().Translation) \< 150.0):  
Target.Damage(Damage)  
if (PlayerDevice.PlayerisBlocking = true):  
animation\_instance.Stop()  
animation\_controller.PlayAndAwait(ChestStun\_Anim)  
Print(“Stunned”)
