heres the code, i used the Double Jump Tutorial on the wiki and i didnt copy and paste anything.
local UserInputService = game:GetService("UserInputService")
local LocalPlayer = game:GetService("Players").LocalPlayer
local Character
local Humanoid
local DoubleJump = false
local debounce = false
UserInputService.JumpRequest:connect(function()
if not Character or not Humanoid or not Character:IsDescendantOf(workspace) or Humanoid:GetState() == Enum.HumanoidStateType.Dead then
return
end
if not debounce then
debounce = true
if not DoubleJump and Humanoid:GetState() == Enum.HumanoidStateType.Freefall then
local torso = Character:FindFirstChild("tTorso")
if torso then
torso.Velocity = Vector3.new(torso.Velocity.X, Humanoid.JumpPower * 1.2, torso.Velocity.Z)
DoubleJump = true
end
end
wait(0.2)
debounce = false
end
end)
local function CharacterAdded(char)
Character = char
Humanoid = char:WaitForChild("Humanoid")
end
if LocalPlayer.Character then
CharacterAdded(LocalPlayer.Character)
end
LocalPlayer.CharacterAdded:connect(CharacterAdded)

1 comment
Any errors?