# Get player character return null in player controller

**URL:** <https://forums.unrealengine.com/t/get-player-character-return-null-in-player-controller/475644>\
**Category:** Character & Animation\
**Tags:** unreal-engine, cast, question\
**Created:** [December 9, 2020, 3:22am UTC](https://forums.unrealengine.com/t/get-player-character-return-null-in-player-controller/475644 "2020-12-09T03:22:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phonicz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Phonicz](https://forums.unrealengine.com/u/Phonicz)\
**Post date:** [December 9, 2020, 3:22am UTC](https://forums.unrealengine.com/t/get-player-character-return-null-in-player-controller/475644/1 "2020-12-09T03:22:54Z")

</div>

![324365-getchar.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/f/9/bf9eaa16bf6b3112422278b08570ac2a6398f3bb.png)

For some odd reason when I try to get player character to cast to my player in the player controller and set a ref, it returns null and the cast fails even though my characters parent class is “Character”.  
This happens after my respawn script, which seems to work fine.

In red was a solution I tried from a video, and didnt work, in blue was the stuff I mentioned above.

If anyone can lend a hand about this that would be great!

Thanks,  
-Phonicz

---

<div class="post-metadata">

**Author:** ![Alekann01](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alekann01](https://forums.unrealengine.com/u/Alekann01)\
**Post date:** [December 9, 2020, 6:45pm UTC](https://forums.unrealengine.com/t/get-player-character-return-null-in-player-controller/475644/2 "2020-12-09T18:45:36Z")

</div>

Hi Phonics

When you respawn your character make sure you possess them otherwise the PlayerController will not know about the new character.
