# llSetTexture

*LSL function*

```lsl
void llSetTexture(string texture, integer face);
```

- `string texture`: Name of a texture in the prim's inventory, or a UUID.
- `integer face`: Face number or ALL_SIDES.

- Delay: 0.2 s
- Energy: 10

Applies the Blinn-Phong diffuse texture to face of the prim.

Sets the [Blinn-Phong](https://wiki.secondlife.com/wiki/PBR_Materials#nomenclature-changes) diffuse **texture** of this prim's **face**.

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

## Caveats

- [Inspect](https://wiki.secondlife.com/wiki/Inspect) does not show texture information (like [creator](/functions/llGetInventoryCreator/))

## Examples

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

```lsl
default
{
    state_entry()
    {
        // the first texture alphabetically inside the same prim's inventory
        string texture = llGetInventoryName(INVENTORY_TEXTURE, 0);

        // set it on all sides of the prim containing the script
        llSetTexture(texture, ALL_SIDES);
    }
}
```

</details>

## Known issues

From the issue templates included by the wiki article:

- SVC-914 (bug): CHANGED_TEXTURE is not triggered when texture is changed via script

## See also

### Functions

- [llSetLinkTexture](/functions/llSetLinkTexture/)
- [llGetTexture](/functions/llGetTexture/)

### Articles

- [Internal Textures](https://wiki.secondlife.com/wiki/Internal_Textures)

---

*Source: [LlSetTexture](https://wiki.secondlife.com/wiki/LlSetTexture) on the Second Life Wiki. Content from the Second Life Wiki articles LlSetTexture (revision 1215656, 2023-11-30), Template:Issues/SVC-914 (revision 1180639, 2013-08-09), Template:LSL Function/face (revision 1175878, 2013-01-06) and Template:LSL Function/inventory (revision 1191151, 2014-06-07), CC BY-SA 3.0.*

---

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