学ぶ
エンジンクラス
ImageLabel

*このコンテンツは、ベータ版のAI(人工知能)を使用して翻訳されており、エラーが含まれている可能性があります。このページを英語で表示するには、 こちら をクリックしてください。



APIリファレンス
プロパティ
Image
並列読み取り
機能: UI
ImageLabel.Image:ContentId

ImageColor3
並列読み取り
機能: UI
ImageLabel.ImageColor3:Color3

ImageContent
並列読み取り
機能: UI
ImageLabel.ImageContent:Content

ImageRectOffset
並列読み取り
機能: UI
ImageLabel.ImageRectOffset:Vector2

ImageRectSize
並列読み取り
機能: UI
ImageLabel.ImageRectSize:Vector2

ImageTransparency
並列読み取り
機能: UI
ImageLabel.ImageTransparency:number
コードサンプル
振動する画像の透明度
local RunService = game:GetService("RunService")
local imageLabel = script.Parent
local function onRenderStep()
-- 0から1までの間でサイン波を使用してImageTransparencyを振動させる
imageLabel.ImageTransparency = math.sin(workspace.DistributedGameTime * math.pi) * 0.5 + 0.5
end
RunService.RenderStepped:Connect(onRenderStep)

IsLoaded
読み取り専用
複製されていません
並列読み取り
機能: UI
ImageLabel.IsLoaded:boolean
コードサンプル
画像の読み込み時間
local imageLabel = script.Parent
local startTime = workspace.DistributedGameTime
-- 画像の読み込みを待つ
while not imageLabel.IsLoaded do
task.wait()
end
-- 読み込みにかかった時間を測定して表示する
local deltaTime = workspace.DistributedGameTime - startTime
print(("画像が%.3f秒で読み込まれました"):format(deltaTime))

ResampleMode
並列読み取り
機能: UI
ImageLabel.ResampleMode:Enum.ResamplerMode

ScaleType
並列読み取り
機能: UI
ImageLabel.ScaleType:Enum.ScaleType

SliceCenter
並列読み取り
機能: UI
ImageLabel.SliceCenter:Rect

SliceScale
並列読み取り
機能: UI
ImageLabel.SliceScale:number

TileSize
並列読み取り
機能: UI
ImageLabel.TileSize:UDim2
コードサンプル
画像スケールタイプデモ
local imageLabel = script.Parent
-- ソース画像を64x64の錠前に設定します
imageLabel.Image = "rbxassetid://284402752"
imageLabel.BackgroundTransparency = 0
imageLabel.BackgroundColor3 = Color3.new(1, 1, 1) -- 白
imageLabel.ImageColor3 = Color3.new(0, 0, 0) -- 黒
local function resizeInACircle()
for theta = 0, 2, 0.02 do
imageLabel.Size =
UDim2.new(0, 100 + math.cos(theta * 2 * math.pi) * 50, 0, 100 + math.sin(theta * 2 * math.pi) * 50)
task.wait()
end
end
while true do
-- ストレッチはソース画像をUI要素のスペースに合わせて単純に引き伸ばします
imageLabel.ScaleType = Enum.ScaleType.Stretch
resizeInACircle()
-- タイルはソース画像を複数回レンダリングします
-- UI要素のスペースを埋めるのに十分な回数
imageLabel.ScaleType = Enum.ScaleType.Tile
imageLabel.TileSize = UDim2.new(0, 64, 0, 64)
resizeInACircle()
-- スライスは画像を9スライスのUIに変換します。
imageLabel.ScaleType = Enum.ScaleType.Slice
imageLabel.SliceCenter = Rect.new(30, 30, 34, 34)
resizeInACircle()
end

©2026 Roblox Corporation。Roblox(ロブロックス)、RobloxロゴおよびPowering Imaginationは、米国並びにその他の国における登録商標および非登録商標です。