0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【#4】ジャンプ力300!60秒で作るスーパージャンプ床【Roblox Lua】

こんにちは、うのっちです🍝
この記事は、Medium英語記事の日本語版です。
たった60秒で、ジャンプ力が一時的に爆上がりするジャンプ床を作る方法を紹介します!


🎬 実際の動作を見たい?


🛠️ この教材で学べること

  • プレイヤーがパーツに触れたか検出する方法
  • ジャンプ力を一時的に上げる方法
  • 一定時間後にジャンプ力を元に戻す方法

🧱 ステップ1:ジャンプパッドを設置

  1. Part を1つ設置し、名前を JumpPad にする
  2. Anchored = true に設定して、地面に固定
  3. CanCollide = true のままでOK(床として機能)

🧠 ステップ2:スクリプトを追加

JumpPadScript を挿入し、以下のコードを貼り付けます:

local part = script.Parent

part.Touched:Connect(function(hit)
 local character = hit.Parent
 if character and character:FindFirstChild("Humanoid") then
  character.Humanoid.JumpPower = 300
  character.Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)

  -- Reset after 2 seconds
  task.delay(2, function()
   if character and character:FindFirstChild("Humanoid") then
    character.Humanoid.JumpPower = 50
   end
  end)
 end
end)

💡 解説ポイント

Touched:プレイヤーが床に触れた瞬間に反応

JumpPower = 300:ジャンプ力を爆上げ!(通常は約50)

ChangeState(Jumping):ジャンプ状態に即移行させる

task.delay:2秒後にジャンプ力を元の値(50)に戻す安全な非同期処理

🧪 ボーナスヒント

JumpPower や delay 時間はゲームに合わせて自由にカスタマイズOK!

床の色やエフェクトを派手にするともっとゲームっぽくなります✨

👤 作者について

うのっち・ピーター・ぺーたー 🍝
60秒で学べるRobloxスクリプト講座をTikTokとMediumで連載中!
フォローしてくれると超よろこびます🙌

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?