# llRegionSayTo

*LSL function*

```lsl
void llRegionSayTo(key target, integer channel, string msg);
```

- `key target`: UUID of the target agent or prim in the same region.
- `integer channel`: Chat channel (any 32-bit signed integer value) to chat the message on.
- `string msg`: Text message string to send.

- Energy: 10

Says[^wiki-0569f2] the text supplied in string **msg** on channel supplied in [integer](https://wiki.secondlife.com/wiki/integer) **channel** to the [object](https://wiki.secondlife.com/wiki/object) or [avatar](https://wiki.secondlife.com/wiki/Avatar) specified by **target**

[^wiki-0569f2]: In this context, *saying* or *speaking* means that a message is being *sent* to the recipient (object or avatar); it's not about audio/voice chat!

```lsl title="How to use" frame="terminal"
llRegionSayTo(NULL_KEY, 0, "");
```

## Caveats

- Text is spoken directly to the [object](https://wiki.secondlife.com/wiki/object) or [avatar](https://wiki.secondlife.com/wiki/Avatar) within the same [region](https://wiki.secondlife.com/wiki/region) as the [script](https://wiki.secondlife.com/wiki/Script).
- Script in tasks other than **target** can neither listen for[^wiki-70220d], nor receive these text messages, with an exception for attachments as described below.
- **msg** can be a maximum of 1024 bytes. This can convey 1024 ASCII characters, or 256-512 multibyte UTF-8 characters such as `á` (2 bytes), `ℋ` (3 bytes) or `🧡` (4 bytes).
- A [prim](https://wiki.secondlife.com/wiki/prim) cannot hear itself, to prevent problems with recursion. Use [llMessageLinked](/functions/llMessageLinked/) instead for intra-prim messaging.
- Sending text on **DEBUG_CHANNEL** is not supported.
- Text sent to an avatar's [ID](https://wiki.secondlife.com/wiki/UUID) on channel [zero](/constants/PUBLIC_CHANNEL/) will be sent to the receiver's viewer.
- Text sent to an avatar's ID on non-zero channels can be heard[^wiki-395aab] by any attachment on the avatar.
- A quick series of messages sent by [llRegionSayTo](/functions/llRegionSayTo/) cannot be relied on to arrive at their destination in the same order as sent.
- There is a per-destination throttle of 200 messages sent over 10 seconds on channel [zero](/constants/PUBLIC_CHANNEL/). Thereafter, there is also a per-sending-object throttle of 100 messages on channel zero over 300 seconds (5 minutes). This throttle is relevant only after the first throttle is activated. Messages sent on channels other than zero do not trigger the throttle but, once it is triggered, the block applies to *all* channels. The block is region-wide and applies to all objects with the same [owner](https://wiki.secondlife.com/wiki/Category:LSL_Owner). The block apparently lasts until the region is restarted.

[^wiki-70220d]: In this context, this means waiting to *receive* a message.
[^wiki-395aab]: I.e., *received*

## Examples

<details open>
<summary>Example 1</summary>

```lsl
default
{
    touch_start(integer num_detected)
    {
        key id = llDetectedKey(0);

        // send a message to the chat window of the avatar touching
        llRegionSayTo(id, 0, "You touched this!");

        // send a message to the attachments of the avatar touching
        // example channel: -12345
        llRegionSayTo(id, -12345, "Hello there attachments!");
    }
}
```

</details>

## Notes

- If one object 'says' something to another object (*e.g.*, a button that, when touched, turns on a lamp), consider using a very negative **channel**, *e.g.*,

:

```lsl
llRegionSayTo("55499a64-45c3-4b81-8880-8ffb5a7c251b", -5243212, "turn on");
```

:Using negative channels for script communications remains a common practice because, prior to September 2016, the standard Second Life Viewer was unable to chat directly on those channels (<kbd>/-xxxx message</kbd> wouldn't chat `message` on **channel** `-xxxx`).

- Messages sent on channel zero via [llRegionSayTo](/functions/llRegionSayTo/)() are blocked after 200 messages on to the same destination in a 10 second period. After this throttle is activated, there is a further throttle, on objects belonging to the owner of the object that triggered the first throttle, of 100 messages per object over 5 minutes (see [BUG-5457](https://jira.secondlife.com/browse/BUG-5457)). The block is region-wide and applies to all objects belonging to the owner, so if a script triggers the throttle, all objects in the same region belonging to the same owner will also be blocked. Messages sent on channels other than zero do not trigger the throttles. The throttles apparently reset only when the region is restarted.

Therefore, [llRegionSayTo](/functions/llRegionSayTo/)() is unsuitable for (say) verbose script debugging, and even moderate use can break users' content completely unrelated to the script for an indeterminate (and potentially very long) period of time. Consider using [llOwnerSay](/functions/llOwnerSay/)() for debugging instead or, if this is not appropriate, try `llRegionSayTo(avatar, non-zero-channel, message)` and have an attachment relay the message using [llOwnerSay](/functions/llOwnerSay/)().

## History

Date of Release [26/04/2011](https://wiki.secondlife.com/wiki/Release_Notes/Second_Life_Server/11#11-04-26-227686)

## Known issues

From the issue templates included by the wiki article:

- SCR-66 (bug): **llRegionSayTo**() Fails to send messages to attachments on sitting avatars

## See also

### Functions

|-

||| style="width:9em;" |

- [llListen](/functions/llListen/) — Ask for [listen](/events/listen/) events
- [llInstantMessage](/functions/llInstantMessage/) — Sends chat to a specific avatar, inside or outside the current region.
- [llOwnerSay](/functions/llOwnerSay/) — Sends chat to the owner only to avoid spamming the [PUBLIC_CHANNEL](/constants/PUBLIC_CHANNEL/)
- [llRegionSay](/functions/llRegionSay/) — Sends chat region wide
- [llSay](/functions/llSay/) — Sends chat limited to 20 meters
- [llShout](/functions/llShout/) — Sends chat limited to 100 meters
- [llWhisper](/functions/llWhisper/) — Sends chat limited to 10 meters

### Events

|-

||| style="width:9em;" |

- [listen](/events/listen/) — Receives chat

### Articles

- [Hello Avatar](https://wiki.secondlife.com/wiki/Hello_Avatar)

---

*Source: [LlRegionSayTo](https://wiki.secondlife.com/wiki/LlRegionSayTo) on the Second Life Wiki. Content from the Second Life Wiki articles LlRegionSayTo (revision 1218302, 2025-05-18), Template:Issues/SCR-66 (revision 1157699, 2011-11-13) and Template:LSL Function/uuid (revision 1195911, 2015-03-21), CC BY-SA 3.0.*

---

From lsl.dev: https://lsl.dev/functions/llRegionSayTo/
