Avatar
Method
Avatar loads a player's avatar image onto an ImageLabel automatically.
Overview
The Avatar Method takes a UserId, fetches the player's headshot thumbnail at 420x420 resolution, and applies it to the instance's Image property.
Setup
- Add the
UiUtilstag on yourImageLabel - Add Attribute
Method=Avatar - Add Attribute
UserIdwith one of the accepted values below
Attributes
| Attribute | Type | Required | Description |
|---|---|---|---|
UserId |
Number / String | Yes | The player to display. Accepts a raw UserId, LocalPlayer, or Random |
Examples
Show the local player's avatar:
- Tag:
UiUtils Method=AvatarUserId=LocalPlayer
Show a specific player's avatar:
- Tag:
UiUtils Method=AvatarUserId=12345678
Show a random player's avatar:
- Tag:
UiUtils Method=AvatarUserId=Random
Notes
- The instance must be an
ImageLabelor any instance with anImageproperty - The thumbnail type is HeadShot at 420x420 resolution
- If
UserIdis missing, you'll see a warning in the Output:You have not set the UserId attribute. - If the avatar image fails to load, you'll see:
Failed to get image for UserId: ...