# sm.gui.displayAlertText

Displays an alert message at the top of the screen for a set duration.

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
sm.gui.displayAlertText( text, duration?, queued? )
```

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

**Availability:** Client only

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `text` | string | The message to be displayed |
| `duration` *(optional)* | number | The time in seconds during which the message is shown. Defaults to 4 seconds |
| `queued` *(optional)* | boolean | If true the message is queued, otherwise it is displayed instantly. Defaults to false |
