# sm.message.send

Sends a message to all script instances registered for the given key. Can only be called from server!

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
sm.message.send( messageKey, data? )
```

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

**Availability:** Server only

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `messageKey` | string | The message key. |
| `data` *(optional)* | any | Optional data to send with the message. |
