Function: llTextBox( key avatar, string message, integer channel );

Shows a dialog box on avatar’s screen with the text message. It contains a text box for input, any text that is entered is said by avatar on channel when the “Submit” button is clicked.

  • key avatar – avatar UUID that is in the same region
  • string message – message to be displayed in the text box
  • integer channel – output chat channel, any integer value
  • Channel Constant 
    DEBUG_CHANNEL   0x7FFFFFFF Chat channel reserved for script debugging and error messages, broadcasts to all nearby users.
    PUBLIC_CHANNEL 0x0 Chat channel that broadcasts to all nearby users. This channel is sometimes referred to as: open chat, local chat and public chat.



This function causes the script to sleep for 1.0 seconds.

  • Not supported in official Linden Lab viewers prior to version 2.4, and some TPVs may not support it. Unsupported viewers will display a dialog box with a single option of “!!llTextBox!!”.
  • There is no way by script to kill a text box.
  • There is no way for the script to detect if the user clicked the small “ignore” button (no chat is generated as a result of pressing this button).
  • If the listening prim is out of the 20 meter range of the sending prim when the “Submit” button is pressed, it will not be able to hear the response.
    • This limitation affects attachments also, if the wearer moves more than 20 meters from where the listener is located.
  • The textbox input is limited to 250 bytes (characters). This can be a problem for larger text input; if the input can be over 250 characters, you will have to accept it through chat.

Message Limits:

If it exceeds 7 (Viewer 3) or 8 (Viewer 1) lines, a scroll bar will appear.
Message must be less than 512 bytes and not empty. Otherwise, it will shout an error on DEBUG_CHANNEL. One easy way to create an empty message is to use a line feed, as in

llTextBox(avatar_key," \n",dialog_channel);


integer  gListener;
    touch_start(integer total_number)
        // See 'discussion' page for more comments on choosing a channel and possible left-open listener
        integer channel = -13572468;
        // "" saves byte-code over NULL_KEY
        gListener = llListen( channel, "", "", "");     
        llTextBox(llDetectedKey(0), "Some info text for the top of the window...", channel);
    listen(integer channel, string name, key id, string message)
        llSay(0, "You wrote: " + message);


Credit: Second Life Wiki