# Setting UpdatedComponent of PawnMovementComponent on Constructor doesnt work

**URL:** <https://forums.unrealengine.com/t/setting-updatedcomponent-of-pawnmovementcomponent-on-constructor-doesnt-work/453753>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [August 12, 2019, 1:10pm UTC](https://forums.unrealengine.com/t/setting-updatedcomponent-of-pawnmovementcomponent-on-constructor-doesnt-work/453753 "2019-08-12T13:10:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Navhkrin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Navhkrin](https://forums.unrealengine.com/u/Navhkrin)\
**Post date:** [August 12, 2019, 1:10pm UTC](https://forums.unrealengine.com/t/setting-updatedcomponent-of-pawnmovementcomponent-on-constructor-doesnt-work/453753/1 "2019-08-12T13:10:43Z")

</div>

Basically, when i try to write following line as last line of contructor it doesnt work

```
MovementComponent->SetUpdatedComponent(GetRootComponent());

```

I tried debugging and although movement component is properly moving something, it is not moving the RootComponent i have attached.

However, if i write that line under BeginPlay() function instead of Constructor it works perfectly fine and moves the pawn.
