# TweenInfo（ロブロックス データ型）

> TweenServiceで、変化にかける時間・変化のしかた・くりかえしなどを決めるデータ型です。

- URL：https://roblox.minecraft-okinawa.com/reference/datatypes/TweenInfo/
- 公式：https://create.roblox.com/docs/reference/engine/datatypes/TweenInfo

## 使用例：行ったり来たりする床

（Script／置く場所：動かしたいパーツの中）

```lua
local TweenService = game:GetService("TweenService")
local platform = script.Parent :: BasePart
platform.Anchored = true

local tweenInfo = TweenInfo.new(3, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, -1, true)
local goal = { Position = platform.Position + Vector3.new(0, 0, 20) }
local tween = TweenService:Create(platform, tweenInfo, goal)
tween:Play()
```

## コンストラクター

- `TweenInfo.new(time: number, easingStyle: EasingStyle, easingDirection: EasingDirection, repeatCount: number, reverses: bool, delayTime: number)`：時間・変化のしかた（EasingStyle）・方向・くりかえしの回数・行って戻るか・待ち時間を指定して作ります。

## プロパティ

- `TweenInfo.EasingDirection: EasingDirection`：The direction in which the tween executes.
- `TweenInfo.Time: number`：Duration of the tween, in seconds.
- `TweenInfo.DelayTime: number`：Time of delay until the tween begins, in seconds.
- `TweenInfo.RepeatCount: number`：Number of times the tween repeats.
- `TweenInfo.EasingStyle: EasingStyle`：The style in which the tween executes.
- `TweenInfo.Reverses: bool`：Whether or not the tween interpolates in reverse tween once the initial tween completes.

英語の説明とメンバー一覧：Roblox Creator Documentation（CC BY 4.0）。日本語の解説はこのサイト独自のものです。

執筆：鈴木孝昌（現役プロジェクトマネージャー／プログラミング講師）／運営：沖縄マイクラ部 プログラミングスクール「クロスウェーブ」（https://minecraft-okinawa.com/）