Robloxで通常のジャンプよりも高くジャンプする方法
Robloxで高くジャンプするにはJumpHeight(ジャンプの高度)、もしくはJumpPower(ジャンプ力)を値を大きくすれば良い
https://developer.roblox.com/en-us/api-reference/property/Humanoid/JumpHeight
https://developer.roblox.com/en-us/api-reference/property/Humanoid/JumpPower
ゲームを通して一定のジャンプ力で良い場合
StarterPlayerを選択する

PropertiesのCharacter Jump Settings よりCharacter Jump SettingsのCharacterJumpHeightを100にする

ジャンプ力で調整したい場合はCharacterJumpPowerのチェックを入れた後、CharacterJumpPowerの値を大きくすれば良い

JumpHeightを100にした場合

スクリプトで動的にジャンプ力を調整する
スクリプトでJumpHeightやJumpPowerの値を変更することでゲーム内で動的にジャンプ力を調整することができる
ServerScriptServiceの配下にスクリプトを作成、名前をJumpHeightCtonrolにする

スクリプトを以下のように編集する
local Players = game:GetService("Players") -- 5秒ごとにジャンプの高さを変更する local function jumpHeightControl(character) local humanoid = character:FindFirstChildWhichIsA("Humanoid") if humanoid then while true do humanoid.JumpHeight = 100 wait(5) humanoid.JumpHeight = 7.2 wait(5) end end end -- ゲームにプレイヤーが参加し、キャラクターが追加されたらjumpHeightControlを呼び出す Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(jumpHeightControl) end)
結果
