学ぶ
エンジンクラス
Decal

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


概要
継承されたメンバー
継承者
コードサンプル
デカールテクスチャの変更
-- パートを作成
local part = Instance.new("Part")
part.Size = Vector3.new(5, 1, 5)
part.Position = Vector3.new(0, 0.5, 0)
part.Anchored = true
part.TopSurface = Enum.SurfaceType.Smooth
part.BrickColor = BrickColor.new("Toothpaste")
-- デカールを作成
local decal = Instance.new("Decal")
decal.Face = Enum.NormalId.Top
decal.Parent = part
-- 顔を定義
local happyFace = Content.fromUri("http://www.roblox.com/asset/?id=26424652")
local sadFace = Content.fromUri("http://www.roblox.com/asset/?id=147144198")
decal.ColorMapContent = happyFace
-- 接触イベント
local cooldown = false
part.Touched:Connect(function(hit)
if not cooldown then
if hit and hit.Parent then
cooldown = true
sound:Play()
decal.ColorMapContent = sadFace
task.wait(1)
decal.ColorMapContent = happyFace
task.wait(0.2)
cooldown = false
end
end
end)
-- ワークスペースに追加
part.Parent = workspace
フェードデカール
local TweenService = game:GetService("TweenService")
local part = Instance.new("Part")
part.Size = Vector3.new(10, 10, 1)
part.Position = Vector3.new(0, 5, 0)
part.Anchored = true
part.Transparency = 1
local decal = Instance.new("Decal")
decal.Face = Enum.NormalId.Front
decal.ColorMapContent = Content.fromUri("http://www.roblox.com/asset/?id=699259085") -- ROBLOXのロゴ
decal.Parent = part
part.Parent = workspace
local tween = TweenService:Create(
decal,
TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, -1, true),
{ Transparency = 1 }
)
tween:Play()

APIリファレンス
プロパティ
Color3
並列読み取り
機能: Basic
Decal.Color3:Color3
コードサンプル
デカールのColor3
local TweenService = game:GetService("TweenService")
local part = Instance.new("Part")
part.Size = Vector3.new(10, 10, 1)
part.Position = Vector3.new(0, 5, 0)
part.Anchored = true
part.Transparency = 1
local decal = Instance.new("Decal")
decal.Face = Enum.NormalId.Front
decal.ColorMapContent = Content.fromUri("http://www.roblox.com/asset/?id=1145367640")
decal.Parent = part
part.Parent = workspace
local redTween = TweenService:Create(
decal,
TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out),
{ Color3 = Color3.new(1, 0, 0) }
)
local greenTween = TweenService:Create(
decal,
TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out),
{ Color3 = Color3.new(0, 1, 0) }
)
local blueTween = TweenService:Create(
decal,
TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out),
{ Color3 = Color3.new(0, 0, 1) }
)
while true do
redTween:Play()
redTween.Completed:Wait()
greenTween:Play()
greenTween.Completed:Wait()
blueTween:Play()
blueTween.Completed:Wait()
end

ColorMap
複製されていません
並列読み取り
機能: Basic
Decal.ColorMap:ContentId

ColorMapContent
複製されていません
並列読み取り
機能: Basic
Decal.ColorMapContent:Content

LocalTransparencyModifier
非表示
複製されていません
並列読み取り
機能: Basic
Decal.LocalTransparencyModifier:number

MetalnessMap
非表示
プラグインのセキュリティ
並列読み取り
機能: Basic
Decal.MetalnessMap:ContentId

MetalnessMapContent
プラグインのセキュリティ
並列読み取り
機能: Basic
Decal.MetalnessMapContent:Content

NormalMap
非表示
プラグインのセキュリティ
並列読み取り
機能: Basic
Decal.NormalMap:ContentId

NormalMapContent
プラグインのセキュリティ
並列読み取り
機能: Basic
Decal.NormalMapContent:Content

Rotation
並列読み取り
機能: Basic
Decal.Rotation:number

RoughnessMap
非表示
プラグインのセキュリティ
並列読み取り
機能: Basic
Decal.RoughnessMap:ContentId

RoughnessMapContent
プラグインのセキュリティ
並列読み取り
機能: Basic
Decal.RoughnessMapContent:Content

Shiny
非推奨

Specular
非推奨

Texture
非推奨

TextureContent
非推奨

TexturePack
Robloxのセキュリティ
並列読み取り
機能: Basic
Decal.TexturePack:ContentId

Transparency
並列読み取り
機能: Basic
Decal.Transparency:number

UVOffset
並列読み取り
機能: Basic
Decal.UVOffset:Vector2

UVScale
並列読み取り
機能: Basic
Decal.UVScale:Vector2

ZIndex
並列読み取り
機能: Basic
Decal.ZIndex:number

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