# Why DefaultPawnClass doesnt work

**URL:** <https://forums.unrealengine.com/t/why-defaultpawnclass-doesnt-work/451156>\
**Category:** Blueprint\
**Tags:** unreal-engine, pawn, CPP, question, Blueprint\
**Created:** [June 23, 2019, 8:01pm UTC](https://forums.unrealengine.com/t/why-defaultpawnclass-doesnt-work/451156 "2019-06-23T20:01:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DaroTL](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DaroTL](https://forums.unrealengine.com/u/DaroTL)\
**Post date:** [June 23, 2019, 8:01pm UTC](https://forums.unrealengine.com/t/why-defaultpawnclass-doesnt-work/451156/1 "2019-06-23T20:01:13Z")

</div>

class doesnt change, please tell me whats wrong.  
This is script

![280557-capture1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/5/2/f527647fa8614321cf8bc781d790027d93d967de.png)

![280556-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/b/28bdcb88a091f3888aed5f5e59b8e3a8bc47f577.png)

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [June 23, 2019, 8:07pm UTC](https://forums.unrealengine.com/t/why-defaultpawnclass-doesnt-work/451156/2 "2019-06-23T20:07:43Z")

</div>

You sure you set that game mode class in project settings or world settings?

---

<div class="post-metadata">

**Author:** ![danielf94](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@danielf94](https://forums.unrealengine.com/u/danielf94)\
**Post date:** [June 24, 2019, 2:17am UTC](https://forums.unrealengine.com/t/why-defaultpawnclass-doesnt-work/451156/3 "2019-06-24T02:17:17Z")

</div>

The code looks good, now verify the following:

go to adjustments of the world of your level and check if in gamemode. where it says “GameMode Override” select the name of your gamemode and you will see a preview of the settings of your gamemode that you selected

![280588-captura.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/3/0/1308cfa0231e7bc8b9f0af6f4245041b398ceb17.png)
