# Level switching To and Fro upon Key press

**URL:** <https://forums.unrealengine.com/t/level-switching-to-and-fro-upon-key-press/399707>\
**Category:** Blueprint\
**Tags:** development-server, unreal-engine, UE4, Blueprint, question, CPP\
**Created:** [July 5, 2017, 11:06am UTC](https://forums.unrealengine.com/t/level-switching-to-and-fro-upon-key-press/399707 "2017-07-05T11:06:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnkitPassi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AnkitPassi](https://forums.unrealengine.com/u/AnkitPassi)\
**Post date:** [July 5, 2017, 11:06am UTC](https://forums.unrealengine.com/t/level-switching-to-and-fro-upon-key-press/399707/1 "2017-07-05T11:06:11Z")

</div>

I have 2 separate levels (persistent) : level1 and level2

I want to switch between these levels upon pressing a key (say , F).

I managed to change the level upon pressing key on the server side but not on client side. that means , my level change is replicated to Client for the first time only , but not on second key press.

How can I make connections in BP such that whenever I press Key from Level1 , it switches to Level2 for both server and client and if I press it again , It switches back to Level1 for Server as well as Client.

Not necessarily a Key is required , any other method which I can control in realtime can be used.

Thanks.

 ![201874-image1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/7/f/17fe1669310a6dbc51d89b236ea61b92380deff6.png)

 ![201876-image2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/8/6/486398d634c9666d0d3e03410b902cf7a24996c9.png)

---

<div class="post-metadata">

**Author:** ![Fryderider](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fryderider](https://forums.unrealengine.com/u/Fryderider)\
**Post date:** [July 5, 2017, 11:24am UTC](https://forums.unrealengine.com/t/level-switching-to-and-fro-upon-key-press/399707/2 "2017-07-05T11:24:12Z")

</div>

Hi!

Try using the “Execute Console Command” node instead, and type “ServerTravel level\_name”.

---

<div class="post-metadata">

**Author:** ![AnkitPassi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AnkitPassi](https://forums.unrealengine.com/u/AnkitPassi)\
**Post date:** [July 6, 2017, 5:51am UTC](https://forums.unrealengine.com/t/level-switching-to-and-fro-upon-key-press/399707/3 "2017-07-06T05:51:14Z")

</div>

ServerTravel not working in 4.16

---

<div class="post-metadata">

**Author:** ![Baizetu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Baizetu](https://forums.unrealengine.com/u/Baizetu)\
**Post date:** [August 1, 2022, 7:04am UTC](https://forums.unrealengine.com/t/level-switching-to-and-fro-upon-key-press/399707/4 "2022-08-01T07:04:04Z")

</div>

in this blueprint, i replace the node “switch to level” by “open level”, and it’s work.  
i use the same node graph in level1 level2  
hope it can help you!
