# Spawn and switch pawn on clientside

**URL:** <https://forums.unrealengine.com/t/spawn-and-switch-pawn-on-clientside/387916>\
**Category:** XR Development\
**Tags:** Replication, spawn-actor, possession, unreal-engine, pawn, question\
**Created:** [March 14, 2017, 5:15pm UTC](https://forums.unrealengine.com/t/spawn-and-switch-pawn-on-clientside/387916 "2017-03-14T17:15:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_3b4c8d46](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_3b4c8d46](https://forums.unrealengine.com/u/anonymous_user_3b4c8d46)\
**Post date:** [March 14, 2017, 5:15pm UTC](https://forums.unrealengine.com/t/spawn-and-switch-pawn-on-clientside/387916/1 "2017-03-14T17:15:25Z")

</div>

I’m having serious problems with this, I thought I had it nailed at one point but issues keeps coming to me.  
I currently have 2 problems. I would really appreciate a new set of fresh eyes on this issue, thank you!

**1: When the “VR Pawn” is server, it swaps pawn nicely although the pawn movement isn’t being replicated"  
2: When the “VR Pawn” is client, the server “player” gets really messed up, the screen freezes and the server cannot do anything.**

I’m using the steam subsystem for networking.

This is my current code.

My Player Controller which has event “§” which will switch between 2 pawns (Vr Pawn and Default Pawn).

 ![130003-1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/9/4/794f41094da8e15051aedd9ee72ab053d042dcd4.jpeg)

This section just destroys the pawn and unpossesses the pawn and then requests the game mode to spawn a new pawn and possess it with the player controller send from the “§” event.

 ![130004-2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/5/8/758f02dd27f73d9c903b2f267974d7bc1e5065dc.png)

This is the part where the game mode is supposed to spawn and possess the new pawn.

 ![130005-3.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/1/3/d13fd7d8b3ca175232eed5dd545f4802ade64606.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_3b4c8d46](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_3b4c8d46](https://forums.unrealengine.com/u/anonymous_user_3b4c8d46)\
**Post date:** [March 15, 2017, 10:26am UTC](https://forums.unrealengine.com/t/spawn-and-switch-pawn-on-clientside/387916/2 "2017-03-15T10:26:43Z")

</div>

Bump, can someone please take a look at this problem with me?  
I’ve modified my code and it’s probably? for the better. Although it’s still not working.

This is my updated situation:  
My player controller does some irrelevant stuff and thne requests the game mode to switch pawn.

 ![130133-1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/c/4/0c42b136f4071a6b349f3fcfce06b20e2900ae06.jpeg)

The Game Mode retrieves the transform (location) of “current” pawn, then destroys the pawn and attempts to spawn a new pawn of a different class and then attempts to possess the pawn with the specified player controller.

 ![130134-2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/1/c/31c6d7d528fccfb1484046f0882d6ce73870eb5c.png)

 ![130135-3.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/c/4/6c47b7ce9760a5dca34f634865437b7d3090d951.png)
