ジャンプ台の作り方
入門作例更新日:2026年11月13日Luauの型チェック済み
ひとことで言うと
ふれると、空高く飛び上がるジャンプ台です。
完成するもの
ふれると、空高く飛び上がるジャンプ台です。
スクリプト
(Script/置く場所:ジャンプ台のパーツの中)
local pad = script.Parent :: BasePart
pad.Touched:Connect(function(hit)
local character = hit.Parent
if not character then
return
end
local root = character:FindFirstChild("HumanoidRootPart")
if root and root:IsA("BasePart") then
root.AssemblyLinearVelocity = Vector3.new(0, 100, 0)
end
end)
しくみ
ふれたキャラクターのHumanoidRootPart(体の中心)に、上向きの速度(AssemblyLinearVelocity)を入れて、飛び上がらせます。
アレンジしてみよう
- Vector3.new(0, 100, 0) の100を変えると、高さが変わります
- 横向きの数字も入れると、斜めに飛び出します