Image
Images display static assets with optional tinting and sizing controls.
Playground
Unavailable
Usage
You can create an Image by calling the AddImage method on a Groupbox.
Arguments
Groupbox:AddImage("MyImage", {
Image = "http://www.roblox.com/asset/?id=135666356081915",
Height = 200,
})| Arg Idx | Argument Description | Type | Default |
|---|---|---|---|
| 1 | Index/ID of the image element | string | nil |
| 2 | Image configuration table | table | nil |
Configuration Table
Prop
Type
Methods
You can use the following methods to interact with the image element:
SetImage
Updates the displayed image.
Image:SetImage(image)| Arg Idx | Argument Description | Type | Default |
|---|---|---|---|
| 1 | Image URL or asset ID | string | nil |
SetTransparency
Sets the transparency value.
Image:SetTransparency(value)| Arg Idx | Argument Description | Type | Default |
|---|---|---|---|
| 1 | Transparency between 0 and 1 | number | nil |
SetColor
Applies a color tint.
Image:SetColor(color)| Arg Idx | Argument Description | Type | Default |
|---|---|---|---|
| 1 | Color tint (Color3) | Color3 | nil |
SetRectOffset
Updates the rectangle offset.
Image:SetRectOffset(offset)| Arg Idx | Argument Description | Type | Default |
|---|---|---|---|
| 1 | Offset (Vector2) | Vector2 | nil |
SetRectSize
Updates the rectangle size.
Image:SetRectSize(size)| Arg Idx | Argument Description | Type | Default |
|---|---|---|---|
| 1 | Size (Vector2) | Vector2 | nil |
SetScaleType
Sets the frame scaling behaviour.
Image:SetScaleType(scaleType)| Arg Idx | Argument Description | Type | Default |
|---|---|---|---|
| 1 | Scale type (Enum.ScaleType) | Enum.ScaleType | nil |
SetHeight
Adjusts the frame height.
Image:SetHeight(height)| Arg Idx | Argument Description | Type | Default |
|---|---|---|---|
| 1 | Frame height in pixels | number | nil |
SetVisible
Shows or hides the image element.
Image:SetVisible(visible)| Arg Idx | Argument Description | Type | Default |
|---|---|---|---|
| 1 | Visibility toggle | boolean | nil |
Example
local Options = Library.Options
local Image = Groupbox:AddImage("MyAgaImage", {
Image = "http://www.roblox.com/asset/?id=135666356081915",
Transparency = 0,
Color = Color3.new(1, 1, 1),
RectOffset = Vector2.zero,
RectSize = Vector2.zero,
ScaleType = Enum.ScaleType.Fit,
Height = 200,
})
Image:SetImage(getcustomasset("mspaint.png"))
Image:SetTransparency(0.1)
Image:SetColor(Color3.fromRGB(255, 200, 200))