#Double Jump Script Bug
1 messages · Page 1 of 1 (latest)
0 print statements💔
just say you cant solve it 🙄
i can help fixing it
** You are now Level 1! **
@lime hamlet
Here is the corrected version of the file (needs to be LocalScript and In StarterPlayerScripts)
You now have to let go of the jump button after your first jump before you can double‑jump, now holding it down won’t trigger the second jump anymore
@lime hamlet
you dont know how your own script works bcuz its ai generated
printing is the first step to debugging
thats rather pretentious of you
** You are now Level 3! **
What if I told you I got rid of the print statements in an attempt to fit it into one message on Discord?
I realized that
lmfao
it was 3am give me a break
i agree with you
This changed nothing about the state of the bug
anyways i think we alr solved this one
"I have a double jump script but for some reason it lets you hold the jump button and double jump instantly" this was your problem and i tried to fix it..
about the state of the bug
i think i fixed that too
its working when i tried testing it
It looks the same as in the recording when I try to test it
... like when you hold the Space button it doeble jumps?
double*
yeah, every few jumps
its random
are you sure it isnt your keyboard problem?
I just ran a keyboard click speed test, and I got 1 click over 10 seconds holding it down, like its supposed to
** You are now Level 5! **
you are right
ima fix it real quick
@lime hamlet
use my script instead
it works perfectly
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local rootPart = character:WaitForChild("HumanoidRootPart")
local canDoubleJump = false
local hasDoubleJumped = false
local jumpDebounce = false
player.CharacterAdded:Connect(function(char)
character = char
humanoid = character:WaitForChild("Humanoid")
rootPart = character:WaitForChild("HumanoidRootPart")
hasDoubleJumped = false
end)
humanoid.StateChanged:Connect(function(_, state)
if state == Enum.HumanoidStateType.Landed then
hasDoubleJumped = false
canDoubleJump = false
end
end)
humanoid.Jumping:Connect(function(isActive)
if isActive and not hasDoubleJumped then
canDoubleJump = true
end
end)
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
if input.KeyCode == Enum.KeyCode.Space
and canDoubleJump
and not hasDoubleJumped
and not jumpDebounce then
jumpDebounce = true
hasDoubleJumped = true
humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
task.wait(0.2)
jumpDebounce = false
end
end)
where would I activate an animation upon double jump in here as well as make it not loopable
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local doubleJumpAnimationId = "rbxassetid://108415556369442"
local animationTrack
local canDoubleJump = false
local hasDoubleJumped = false
local jumpDebounce = false
player.CharacterAdded:Connect(function(char)
character = char
humanoid = character:WaitForChild("Humanoid")
hasDoubleJumped = false
end)
humanoid.StateChanged:Connect(function(_, state)
if state == Enum.HumanoidStateType.Landed then
hasDoubleJumped = false
canDoubleJump = false
end
end)
humanoid.Jumping:Connect(function(isActive)
if isActive and not hasDoubleJumped then
canDoubleJump = true
end
end)
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
if input.KeyCode == Enum.KeyCode.Space
and canDoubleJump
and not hasDoubleJumped
and not jumpDebounce then
jumpDebounce = true
hasDoubleJumped = true
humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
if not animationTrack or not animationTrack.IsPlaying then
local anim = Instance.new("Animation")
anim.AnimationId = doubleJumpAnimationId
animationTrack = humanoid:LoadAnimation(anim)
animationTrack.Looped = false
animationTrack:Play()
animationTrack.Stopped:Connect(function()
animationTrack:Stop()
end)
end
task.wait(0.2)
jumpDebounce = false
end
end)
@lime hamlet will it work now, and is it for R6 or R15?
I dunno if the animation works because it was never working to begin with, that's another bug that I'm already working on. The double jump works now though. I could check if its r15 or r6, but why do you ask?
just asked.
basically
i fixed the animation
..
with Animation Spoofer v2
@lime hamlet
what does that do
Gets the animation and fixes
anyways the animation is a front flip
indeed
how could I reset the players ability to double jump from another script?
basically I have a bounce pad but I want the player to be able to double jump after each time they hit the bounce pad but the game doesnt count it as hitting the ground
btw this script is only for R15 but the animation is buggy as hell 😭
** You are now Level 3! **
I think my players are r6 but the double jump part works
then.. you gotta have another animation for R6
bc the animation supports only R15
want the animation deleted?
would I have to open the game in roblox instead of studio to verify this
i already tried
its only R15
I might be able to just swap the characters to r15 later instead but I need the owner of the game to wake up
ill let you know
k