学ぶ
エンジンクラス
TweenService
作成できません
サービス

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


概要
方法
Create(instance: Instance,tweenInfo: TweenInfo,propertyTable: Dictionary):Tween
GetValue(alpha: number,easingStyle: Enum.EasingStyle,easingDirection: Enum.EasingDirection):number
SmoothDamp(current: Variant,target: Variant,velocity: Variant,smoothTime: number,maxSpeed: number?,dt: number?):Tuple
継承されたメンバー
コードサンプル
ツイーン作成
local TweenService = game:GetService("TweenService")
local part = Instance.new("Part")
part.Position = Vector3.new(0, 10, 0)
part.Color = Color3.new(1, 0, 0)
part.Anchored = true
part.Parent = game.Workspace
local goal = {}
goal.Position = Vector3.new(10, 10, 0)
goal.Color = Color3.new(0, 1, 0)
local tweenInfo = TweenInfo.new(5)
local tween = TweenService:Create(part, tweenInfo, goal)
tween:Play()
Tweenのループ
local TweenService = game:GetService("TweenService")
local part = Instance.new("Part")
part.Position = Vector3.new(0, 10, 0)
part.Anchored = true
part.Parent = workspace
local tweenInfo = TweenInfo.new(
2, -- 時間
Enum.EasingStyle.Linear, -- イージングスタイル
Enum.EasingDirection.Out, -- イージング方向
-1, -- RepeatCount(0未満のとき、Tweenは無限にループします)
true, -- Reverses(目標に到達した後、Tweenは逆再生されます)
0 -- 遅延時間
)
local tween = TweenService:Create(part, tweenInfo, { Position = Vector3.new(0, 30, 0) })
tween:Play()
task.wait(10)
tween:Cancel() -- 10秒後にアニメーションをキャンセルする
トゥイーンの一時停止
local TweenService = game:GetService("TweenService")
local part = Instance.new("Part")
part.Position = Vector3.new(0, 10, 0)
part.Anchored = true
part.BrickColor = BrickColor.new("明るい緑")
part.Parent = workspace
local goal = {}
goal.Position = Vector3.new(50, 10, 0)
local tweenInfo = TweenInfo.new(10, Enum.EasingStyle.Linear)
local tween = TweenService:Create(part, tweenInfo, goal)
tween:Play()
task.wait(3)
part.BrickColor = BrickColor.new("明るい赤")
tween:Pause()
task.wait(2)
part.BrickColor = BrickColor.new("明るい緑")
tween:Play()

APIリファレンス
方法
Create
機能: Basic
TweenService:Create(
instance:Instance, tweenInfo:TweenInfo, propertyTable:Dictionary
パラメータ
instance:Instance
tweenInfo:TweenInfo
propertyTable:Dictionary
戻り値
コードサンプル
ツイーン作成
local TweenService = game:GetService("TweenService")
local part = Instance.new("Part")
part.Position = Vector3.new(0, 10, 0)
part.Color = Color3.new(1, 0, 0)
part.Anchored = true
part.Parent = game.Workspace
local goal = {}
goal.Position = Vector3.new(10, 10, 0)
goal.Color = Color3.new(0, 1, 0)
local tweenInfo = TweenInfo.new(5)
local tween = TweenService:Create(part, tweenInfo, goal)
tween:Play()
Tweenのループ
local TweenService = game:GetService("TweenService")
local part = Instance.new("Part")
part.Position = Vector3.new(0, 10, 0)
part.Anchored = true
part.Parent = workspace
local tweenInfo = TweenInfo.new(
2, -- 時間
Enum.EasingStyle.Linear, -- イージングスタイル
Enum.EasingDirection.Out, -- イージング方向
-1, -- RepeatCount(0未満のとき、Tweenは無限にループします)
true, -- Reverses(目標に到達した後、Tweenは逆再生されます)
0 -- 遅延時間
)
local tween = TweenService:Create(part, tweenInfo, { Position = Vector3.new(0, 30, 0) })
tween:Play()
task.wait(10)
tween:Cancel() -- 10秒後にアニメーションをキャンセルする

GetValue
機能: Basic
TweenService:GetValue(
alpha:number, easingStyle:Enum.EasingStyle, easingDirection:Enum.EasingDirection
パラメータ
alpha:number
easingStyle:Enum.EasingStyle
easingDirection:Enum.EasingDirection
戻り値

SmoothDamp
並列書き込み
機能: Basic
シミュレーションへのアクセス
TweenService:SmoothDamp(
current:Variant, target:Variant, velocity:Variant, smoothTime:number, maxSpeed:number?, dt:number?
パラメータ
current:Variant
target:Variant
velocity:Variant
smoothTime:number
maxSpeed:number?
dt:number?
戻り値

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