# Change Scene in GKState Loop !solved!

**URL:** <https://forums.kodeco.com/t/change-scene-in-gkstate-loop-solved/17715>\
**Category:** 2D iOS & tvOS Games by Tutorials\
**Created:** [July 24, 2016, 4:48pm UTC](https://forums.kodeco.com/t/change-scene-in-gkstate-loop-solved/17715 "2016-07-24T16:48:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mizzzi](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/mizzzi/32/37571_2.png) [@mizzzi](https://forums.kodeco.com/u/mizzzi)\
**Post date:** [July 24, 2016, 4:48pm UTC](https://forums.kodeco.com/t/change-scene-in-gkstate-loop-solved/17715/1 "2016-07-24T16:48:10Z")

</div>

Hi

Is it possible to change Scenes in a StateMachine? I have a game that runs in a StateMachine (TapState, RunState, GameOverState). It works fine.

Know i want to integrate a MainMenu with different buttons. A PlayButton, CreditsButton, ScoreButton. All buttons have to present their own scene in the view.

I tried to put the MainMenu in the StateMachine, but i couldn’t change to another scene (presentScene didn’t work!).

So is it possible at all to change a scene in a GKStateMachine? Or do i have to try a different way?

Thanks for answering.

Best regards  
Michael

Solved:  
I add a button in the GameOverState and call a touch on the button in the GameScene, and so i change to the MainMenu. It works fine for me:-)
