Im trying to make it so that the player has to hold down Left Shift and Space to preform a long jump, but this doesn’t work, and it only functions when I hit the shift key.
UIS.InputBegan:Connect(function(Input, IsTyping)
if state == "Running" then
if IsTyping then return end
if Input.KeyCode == Enum.KeyCode.LeftShift and Enum.KeyCode.Space and humanoid.Running then
local speed = Character.Humanoid.WalkSpeed
if IsOn then return end
IsOn = true
local speedBoost = speedWatch(humanoid.WalkSpeed)
JumpAnimation:Play()
print(speedBoost)
humanoid.Jump = false humanoid.JumpPower = 0
root:ApplyImpulse(root.CFrame.LookVector * (1220 * speedBoost))
workspace.Gravity = 98.1
root:ApplyImpulse(root.CFrame.YVector * 500)
task.wait(0.25)
workspace.Gravity = 196.2
humanoid.Jump = false humanoid.JumpPower = 50
-- Tween
local Information = TweenInfo.new(JumpLength, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut,0,true,0)
TweenService:Create(game.Workspace.CurrentCamera,Information, {FieldOfView = DView + 15}):Play()
task.wait(JumpLength)
JumpAnimation:Stop()
task.wait(Cooldown)
IsOn = nil
end
end
end)