# llGetObjectDesc

*LSL function*

```lsl
string string llGetObjectDesc();
```

- Returns: `string`
- Energy: 10

To get the *object's* description (not the current prim's), use [PRIM_DESC](/constants/PRIM_DESC/) or [OBJECT_DESC](/constants/OBJECT_DESC/).

Returns a [string](https://wiki.secondlife.com/wiki/string) containing the description of the prim the script is attached to.

```lsl title="How to use" frame="terminal"
string result = llGetObjectDesc();
```

## Caveats

:::note
This function **does not** get the description of the object's rootprim, but the description of the prim containing the script. Please use [llList2String](/functions/llList2String/)([llGetLinkPrimitiveParams](/functions/llGetLinkPrimitiveParams/)([LINK_ROOT](/constants/LINK_ROOT/), \[ [PRIM_DESC](/constants/PRIM_DESC/) \]), 0); instead.
:::

## Examples

<table>
	<tr>
		<th>**Get this prim's description**</th>
	</tr>
	<tr>
		<td>

			```lsl
			default
			{
			    state_entry()
			    {
			    //  PUBLIC_CHANNEL has the integer value 0
			        llSay(PUBLIC_CHANNEL, "This prim's description: " + llGetObjectDesc() );
			    }
			}
			```

		</td>
	</tr>
</table>

<table>
	<tr>
		<th>**Get the root prim's description**</th>
	</tr>
	<tr>
		<td>

			```lsl
			default
			{
			    state_entry()
			    {
			    //  PUBLIC_CHANNEL has the integer value 0
			        llSay(PUBLIC_CHANNEL, "Rootprim's description: "
			            + llList2String(llGetLinkPrimitiveParams(LINK_ROOT, [ PRIM_DESC ]), 0));
			    }
			}
			```

		</td>
	</tr>
</table>

## See also

### Functions

- [llSetObjectDesc](/functions/llSetObjectDesc/) — Sets the prim description.
- [llGetObjectName](/functions/llGetObjectName/) — Gets the prim name.
- [llSetObjectName](/functions/llSetObjectName/) — Sets the prim name.
- [llGetObjectDetails](/functions/llGetObjectDetails/)

### Articles

- [Prim Attribute Overloading](https://wiki.secondlife.com/wiki/Prim_Attribute_Overloading)

---

*Source: [LlGetObjectDesc](https://wiki.secondlife.com/wiki/LlGetObjectDesc) on the Second Life Wiki. Content from the Second Life Wiki articles LlGetObjectDesc (revision 1194213, 2015-01-22) and Template:LSL Function/prim-desc (revision 1218641, 2026-02-23), CC BY-SA 3.0.*

---

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