Second Life today in one place Gifts & freebies updated every hour 7 languages Free to list your store
12:49 SLT List your event+ List
Grid issue
  • Planned: Scheduled Billing Maintenance, Mon, Nov 16 09:30–10:30 SLT
  • Grid status: Unscheduled Group Chat Maintenance (investigating)
  • On now: Unitarian Universalist Saturday Service in UUtopia
  • On now: The Dharma of Community: Buddhist Society and the Householder
  • On now: SLCS Harvest Fest: Games, Music and Fun at Cheertopia
  • 14:00 SLT: NAD GOUGH Live at Moondance in Cascadia, 2:00 PM SLT
  • News: REZZ MALL: Second Life brands in one web mall
  • Viewer: Second Life Viewer 26.5 Adds Chat Modernization
  • Planned: Scheduled Billing Maintenance, Mon, Nov 16 09:30–10:30 SLT
  • Grid status: Unscheduled Group Chat Maintenance (investigating)
  • On now: Unitarian Universalist Saturday Service in UUtopia
  • On now: The Dharma of Community: Buddhist Society and the Householder
  • On now: SLCS Harvest Fest: Games, Music and Fun at Cheertopia
  • 14:00 SLT: NAD GOUGH Live at Moondance in Cascadia, 2:00 PM SLT
  • News: REZZ MALL: Second Life brands in one web mall
  • Viewer: Second Life Viewer 26.5 Adds Chat Modernization
LSL script

LSL hover text script (and how to remove floating text)

Free LSL hover text script for Second Life: show floating text above any object in any colour, use several lines, and remove stuck text for good.

18 lines ·

Hover text is the floating text above signs, vendors, tip jars and gift boxes. This tiny script sets it in any colour and with as many lines as you need. It also answers a classic question: how do I get rid of floating text that stays after the script is gone?

lsl-hover-text-script.lsl · 18 lines Check this script
// Hover Text - free LSL script from WhatSL (https://whatsl.com/scripts/lsl-hover-text-script)
// Free to use, change and put in your own creations, also ones you sell.
//
// Shows floating text above the object. Use \n for a new line.
// The text stays on the prim even if you delete this script. To remove it, set HOVER_TEXT to ""
// and save the script once.

string HOVER_TEXT  = "Welcome!\nTouch the sign for a free gift";
vector TEXT_COLOR  = <1.0, 1.0, 1.0>;  // red, green, blue from 0.0 to 1.0 (white here)
float  TEXT_ALPHA  = 1.0;              // 1.0 = solid, 0.5 = half see-through

default
{
    state_entry()
    {
        llSetText(HOVER_TEXT, TEXT_COLOR, TEXT_ALPHA);
    }
}

Free to use, change and put in your own creations, also ones you sell.

How to set it up

  1. Put the script in the object and change HOVER_TEXT to your words.
  2. Use \n inside the text to start a new line.
  3. Save. The text appears above the object.

Settings

  • HOVER_TEXT: your text. Keep it short; long text is hard to read from a distance.
  • TEXT_COLOR: red, green and blue values from 0.0 to 1.0. <1.0, 0.85, 0.3> is gold, <0.4, 0.8, 1.0> is light blue.
  • TEXT_ALPHA: 1.0 is solid, lower values make the text see-through.

How to remove floating text

Hover text is a setting of the prim, not of the script, so it stays when you delete the script. To remove it, set HOVER_TEXT to "" (two quotes with nothing between), save the script once, then delete the script.

Frequently asked questions

How far away can people see hover text?

Hover text is visible from a moderate distance and fades further away. Important information should also be on a texture or in a notecard.

Can I make the text change?

Yes. Call llSetText again with new text, for example from a timer or a touch event.

Does hover text cause lag?

No. It is one prim setting and costs almost nothing.

Check your own script: LSL syntax checker →

More scriptsAll scripts
LSL script · 55 lines

LSL door script: touch to open, closes by itself

Free LSL door script for Second Life. Touch to open and close, the door swings on its hinge and closes by itself after a few seconds. Sounds optional.

LSL script · 69 lines

LSL sit and pose script for chairs and pose balls

Free LSL sit script for Second Life chairs, benches and pose balls: sit and play your own animation, set the sit position, hide the ball while in use.

LSL script · 96 lines

LSL tip jar script with thank-you message and total

Free LSL tip jar script for Second Life clubs, DJs, hosts and stores: quick pay buttons, a thank-you message, the total and last tipper in floating text.