# sm.gui.exitToMenu

Exits the current game and returns to the main menu

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
sm.gui.exitToMenu(  )
```

[Open the full Game reference](../Game-Script-Environment/Static-Functions/sm.gui.md#exittomenu)

**Availability:** Client only

> **Note:**
> Can only be used in the Challenge Mode
