> ## Documentation Index
> Fetch the complete documentation index at: https://docsuncv2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# getcustomasset

Turns a file in your workspace folder into a Roblox content id you can use in-game.

```luau theme={null}
getcustomasset(path: string): string
```

`path` is workspace-relative. In return, you get a string that works anywhere Roblox takes a content id - `ImageLabel.Image`, `Decal.Texture`, `Sound.SoundId`, `MeshPart` textures, and so on. Most commonly used to pull your own images and audio into a game, like a custom UI skin or a custom sound.

## Parameters

| Parameter | Type     | Description                          |
| --------- | -------- | ------------------------------------ |
| `path`    | `string` | Workspace-relative file to register. |

## Returns

`string` - an `rbxasset://...` content id pointing at the file.

## Example

Save an image to the workspace, then show it in your own GUI.

<CodeGroup>
  ```luau Example 1 theme={null}
  <<<<<<< HEAD
  local assetId = getcustomasset("image.png")
  =======
  -- getcustomasset(path: string): string
  >>>>>>> 50e30f53759b0538759af25c9b271514aa2c9290
  ```

  ```luau Example 2 theme={null}
  writefile("skins/logo.png", game:HttpGet("https://example.com/logo.png"))

  local gui = Instance.new("ScreenGui", gethui()) -- lebron spotted using 2nd arg of Instance.new 🤯
  local logo = Instance.new("ImageLabel", gui)
  logo.Image = getcustomasset("skins/logo.png")
  ```
</CodeGroup>

<Tip>
  Supports standard image and audio file formats (.png, .jpg, .mp3, .ogg).
</Tip>
