# Blocking with Shield Doesn't work

**URL:** <https://forums.unrealengine.com/t/blocking-with-shield-doesnt-work/480601>\
**Category:** Character & Animation\
**Tags:** blocking, unreal-engine, question\
**Created:** [March 20, 2021, 9:59am UTC](https://forums.unrealengine.com/t/blocking-with-shield-doesnt-work/480601 "2021-03-20T09:59:57Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tamarar357](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tamarar357](https://forums.unrealengine.com/u/Tamarar357)\
**Post date:** [March 20, 2021, 9:59am UTC](https://forums.unrealengine.com/t/blocking-with-shield-doesnt-work/480601/1 "2021-03-20T09:59:57Z")

</div>

So when I press “B” the button I chose to block with it doesn’t work at all. Either the animation is very short or something (Don’t know how to fix that), or it is interfering with my attacks perhaps? Here is what I have attached.

---

<div class="post-metadata">

**Author:** ![GrumbleBunny](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GrumbleBunny](https://forums.unrealengine.com/u/GrumbleBunny)\
**Post date:** [March 20, 2021, 10:53am UTC](https://forums.unrealengine.com/t/blocking-with-shield-doesnt-work/480601/2 "2021-03-20T10:53:45Z")

</div>

If you want to be able to block for as long as you have B held down you might want to make It a specific state in your animation state machine. That way the character can stay in the “blocking” animation for as long as possible.

---

<div class="post-metadata">

**Author:** ![Tamarar357](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tamarar357](https://forums.unrealengine.com/u/Tamarar357)\
**Post date:** [March 24, 2021, 9:42am UTC](https://forums.unrealengine.com/t/blocking-with-shield-doesnt-work/480601/3 "2021-03-24T09:42:11Z")

</div>

Thanks! So I could use in my state machine, a bool perhaps that says IsBlocking or not? Thanks again.

---

<div class="post-metadata">

**Author:** ![Tamarar357](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tamarar357](https://forums.unrealengine.com/u/Tamarar357)\
**Post date:** [March 24, 2021, 9:43am UTC](https://forums.unrealengine.com/t/blocking-with-shield-doesnt-work/480601/4 "2021-03-24T09:43:46Z")

</div>

So I tried what you said, but no luck. I am using the “Greystone character” from UE4 downloads. So I might have something confused with all the current blueprints in there. Take a look please?

 ![333280-blocking2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/a/2/aa2c1970f2449c82a4cdbb9d706660e0b27b981c.jpeg)

---

<div class="post-metadata">

**Author:** ![Tamarar357](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tamarar357](https://forums.unrealengine.com/u/Tamarar357)\
**Post date:** [March 24, 2021, 9:43am UTC](https://forums.unrealengine.com/t/blocking-with-shield-doesnt-work/480601/5 "2021-03-24T09:43:48Z")

</div>

sorry lol here is the correct image.

 ![333281-blocking2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/c/5/8c5651c30d1fe85a5e05a152e39561bd1c47995c.png)

---

<div class="post-metadata">

**Author:** ![Tamarar357](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tamarar357](https://forums.unrealengine.com/u/Tamarar357)\
**Post date:** [March 24, 2021, 9:43am UTC](https://forums.unrealengine.com/t/blocking-with-shield-doesnt-work/480601/6 "2021-03-24T09:43:50Z")

</div>

and here is another image, im not sure what i am doing wrong but it isn’t blocking.

 ![333282-blocking.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/2/712c446e3884c710be1df7196c801509a0bd3966.jpeg)

---

<div class="post-metadata">

**Author:** ![GrumbleBunny](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GrumbleBunny](https://forums.unrealengine.com/u/GrumbleBunny)\
**Post date:** [March 24, 2021, 11:24am UTC](https://forums.unrealengine.com/t/blocking-with-shield-doesnt-work/480601/7 "2021-03-24T11:24:33Z")

</div>

I’d recommend updating the IsBlocking variable in the animation via “Event Blueprint Update Animation” rather than using callbacks, anims are funky

---

<div class="post-metadata">

**Author:** ![Tamarar357](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tamarar357](https://forums.unrealengine.com/u/Tamarar357)\
**Post date:** [March 26, 2021, 9:27pm UTC](https://forums.unrealengine.com/t/blocking-with-shield-doesnt-work/480601/8 "2021-03-26T21:27:06Z")

</div>

So on the last image I DON’T need to do it that way? Instead do something similar in the “Event Blueprint Update Animation”?

---

<div class="post-metadata">

**Author:** ![Tamarar357](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tamarar357](https://forums.unrealengine.com/u/Tamarar357)\
**Post date:** [March 26, 2021, 9:27pm UTC](https://forums.unrealengine.com/t/blocking-with-shield-doesnt-work/480601/9 "2021-03-26T21:27:30Z")

</div>

Okay so here is the new code I have in the “Event Blueprint Update Animation” but it still doesn’t work, no blocking at all.

 ![333699-new.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/1/d/81dbfb1f9b9cd6365dd3ecf6cdbf58ca3f100087.jpeg)

---

<div class="post-metadata">

**Author:** ![GrumbleBunny](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GrumbleBunny](https://forums.unrealengine.com/u/GrumbleBunny)\
**Post date:** [March 26, 2021, 9:35pm UTC](https://forums.unrealengine.com/t/blocking-with-shield-doesnt-work/480601/10 "2021-03-26T21:35:23Z")

</div>

I think it’s recommended to get your character via TryGetPawnOwner. Can you print the value of is blocking in the anim update? Could one of the transitions out of block be triggering immediately?

---

<div class="post-metadata">

**Author:** ![Tamarar357](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tamarar357](https://forums.unrealengine.com/u/Tamarar357)\
**Post date:** [August 2, 2021, 10:47am UTC](https://forums.unrealengine.com/t/blocking-with-shield-doesnt-work/480601/11 "2021-08-02T10:47:59Z")

</div>

I am no longer using this asset, so I don’t need to worry about this issue, thanks though.
