テレポート台の作り方
入門作例更新日:2026年11月13日Luauの型チェック済み
ひとことで言うと
ふれると、別の場所へ一瞬で移動するテレポート台です。
完成するもの
ふれると、別の場所へ一瞬で移動するテレポート台です。
スクリプト
(Script/置く場所:テレポート台のパーツの中(行き先にTeleportTargetという名前のパーツを置く))
local pad = script.Parent :: BasePart
local target = workspace:WaitForChild("TeleportTarget") :: BasePart
pad.Touched:Connect(function(hit)
local character = hit.Parent
if character and character:IsA("Model") and character:FindFirstChildWhichIsA("Humanoid") then
character:PivotTo(target.CFrame + Vector3.new(0, 5, 0))
end
end)
しくみ
行き先に「TeleportTarget」という名前のパーツを置いておきます。ふれたキャラクターをPivotToで、その少し上に移動させます。
アレンジしてみよう
- 行き先を複数用意して、ランダムに選ぶ
- 移動したときに、パーティクルで演出する