Check out my beginner-to-pro scripting series here! th-cam.com/play/PLAgNoIvrYttz9raCi0NfECIiXcFe97FRu.html Comment what videos you want me to make here!
yo this is super cool and it works fine but next time please tell us what type of script i should insert as i inserted a normal one but it didn't work, about 30 mins later actually realized that it was a local script, great tutorial though!
local MaxJumps = 2 local JumpCooldown = 0.2 local UserInputService = game:GetService("UserInputService") local Player = game.Players.LocalPlayer local Character = Player.Character or Player.CharacterAdded:Wait() local Humanoid = Character:WaitForChild("Humanoid") local NumberOfJumpsInARow = 0 local CanPlayerJump = false Humanoid.StateChanged:connect(function(oldState, newState)
if Enum.HumanoidStateType.Landed == newState then NumberOfJumpsInARow = 0 CanPlayerJump = false elseif Enum.HumanoidStateType.Freefall == newState then task.wait(JumpCooldown) CanPlayerJump = true elseif Enum.HumanoidStateType.Jumping == newState then CanPlayerJump = false NumberOfJumpsInARow += 1 end
First of all, thanks for the tutorial, greetings from Mexico. One question, do you know how to make sure that when jumping from a bag in the air, I want it for my speedrun game please 🙏
Hey! It didn’t work for some reason even though I checked I put everything correctly I think it might be in the 21st row I can’t tell if it says “NumberOfJumpsInARow += 1”. Or if it says “NumberOfJumpsInARow = 1” Or if it’s “NumberOfJumpsInARow = 1” if you could tell me that would be GREAT
Awsome tutorial! Altought i have a problem. The code works but im double jumping infinitly and i wrote the script word to word and i even triple checked it but it still double jumps infinitly
just make a script that checks if the player has the gamepass on join, and if true then it enables the double jump script; the double jump script should be disabled by default
@@Scrip_tix I rewatched the video. Now it works. Do you know how i add animations to my secound jump? "local MaxJumps = 2 local JumpCooldown = 0.2 local UserInputService = game:GetService("UserInputService") local Player = game.Players.LocalPlayer local Character = Player.Character or Player.Character:Wait() local Humanoid = Character:WaitForChild("Humanoid") local NumberOfJumpsInARow = 0 local CanPlayerJump = false Humanoid.StateChanged:Connect(function(oldState, newState)
if Enum.HumanoidStateType.Landed == newState then NumberOfJumpsInARow = 0 CanPlayerJump = false elseif Enum.HumanoidStateType.Freefall == newState then task.wait(JumpCooldown) CanPlayerJump = true elseif Enum.HumanoidStateType.Jumping == newState then CanPlayerJump = false NumberOfJumpsInARow -= 1
This does not work ______________ local MaxJumps = 2 local JumpCooldown = 0.2 local inputservice = game:GetService("UserInputService") local Player = game.Players.LocalPlayer local Character = Player.Character or Player.CharacterAdded:Wait() local Humanoid = Character:WaitForChild("Humanoid") local NumberofJumps = 0 local canjump = false Humanoid.StateChanged:Connect(function(oldtate, newstate)
if Enum.HumanoidStateType.Landed == newstate then NumberofJumps = 0 canjump = false
elseif Enum.HumanoidStateType.Freefall == newstate then task.wait(JumpCooldown) NumberofJumps += 1
end
end) inputservice.JumpRequest:Connect(function() if canjump and NumberofJumps < MaxJumps then Humanoid:ChangeState(Enum.HumanoidStateType.Jumping) end end)
local MaxJumps = 2 local JumpCooldown = 0.1 local UserInputService = game:GetService("UserInputService") local Player = game.Players.LocalPlayer local Character = Player.Character or Player.CharacterAdded:Wait() local Humanoid = Character:WaitForChild("Humanoid") local NumberOfJumpsInARow = 0 local CanPlayerJump = false Humanoid.stateChanged:Connect(function(oldState, newState)
if Enum.HumanoidStateType.Landed == newState then NumberOfJumpsInARow = 0 CanPlayerJump = false elseif Enum.HumanoidStateType.Freefall == newState then task.wait(JumpCooldown) CanPlayerJump = true elseif Enum.HumanoidStateType.Jumping == newState then CanPlayerJump = false NumberOfJumpsInARow += 1 end end) UserInputService.JumpRequest:Connect(function()
if CanPlayerJump and NumberOfJumpsInARow < MaxJumps then Humanoid:ChangeState(Enum.HumanoidStateType.Jumping) end
thanks for this awesome tutorial, new sub! Btw can someone help me fix this doesnt work: local MaxJumps = 2 local JumpCooldown = 0.2 local UserInputService = game:GetService("UserInputService") local Player = game.Players.LocalPlayer local Character = Player.Character or Player.CharacterAdded:wait() local humanoid = Character:WaitForChild("humanoid") local NumberOfJumpsInARow = 0 local CanPlayerJump = false humanoid.StateChanged:Connect(function(oldState, NewState)
if Enum.HumanoidStateType.Landed == NewState then NumberOfJumpsInARow = 0 CanPlayerJump = false elseif Enum.HumanoidStateType.Freefall == NewState then task.wait(JumpCooldown) CanPlayerJump = true elseif Enum.HumanoidStateType.Jumping == NewState then CanPlayerJump = false NumberOfJumpsInARow = 1 end
local humanoid = Character:WaitForChild("humanoid") Humanoid has to be capitalized. So it should be: local humanoid = Character:WaitForChild("Humanoid")
----------------------------------------- Settings local MaxJumps = 2 local JumpCooldown = 2.0 ----------------------------------------- Settings local UIS = game:GetService("UserInputService") local Player = game.Players.LocalPlayer local Char = Player.Character or Player.CharacterAdded:Wait() local Humanoid = Char:WaitForChild("Humanoid") local NumJumps = 0 local canjump = false Humanoid.StateChanged:Connect(function(oldstate, newstate) if Enum.HumanoidStateType.Landed == newstate then NumJumps = 0 canjump = false elseif Enum.HumanoidStateType.Freefall == newstate then wait(JumpCooldown) canjump = true elseif Enum.HumanoidStateType.Jumping == newstate then canjump = false NumJumps += 1 end end) UIS.JumpRequest:Connect(function() if canjump and NumJumps < MaxJumps then Humanoid:ChangeState(Enum.HumanoidStateType.Jumping) end end)
nice tutorial but can someone help me find out what wrong with is code local MaxJumps = 2 local JumpCooldown = 0.2 local UserInputService = game:GetService("UserInputService") local Player = game.Players.localPlayer local Character = Player.Character or Player.CharacterAdded:Wait() local Humanoid = Character:WaitForChild("Humanoid") local NumberOfJumpsInARow = 0 local CanPlayerJump = false Humanoid.StateChanged:Connect(function(oldState, newState) if Enum.HumanoidStateType.Landed == newState then NumberOfJumpsInARow = 0 CanPlayerJump = false elseif Enum.HumanoidStateType.Freefall == newState then task.wait(JumpCooldown) CanPlayerJump = false elseif Enum.HumanoidStateType.Jumping == newState then CanPlayerJump = false NumberOfJumpsInARow += 1 end end) UserInputService.JumpRequest:Connect(function() if CanPlayerJump and NumberOfJumpsInARow < MaxJumps then Humanoid:ChangeState(Enum.HumanoidStateType.Jumping) end end)
under this section: elseif Enum.HumanoidStateType.Freefall == newState then task.wait(JumpCooldown) CanPlayerJump = false you wrote 'CanPlayerJump = false' when it should be true, change that and it should work :)
local MaxJumps = 2 local JumpCooldown = 0.2 local UserInputService = game:GetService("UserInputService") local Player = game.Players.LocalPlayer local Character = Player.Character or Player.CharacterAdded:Wait() local Humanoid = Character:WaitForChild("Humanoid") local NumberOfJumpsInARow = 0 local CanPlayerJump = false Humanoid.StateChanged:Connect(function(oldState, newState)
if Enum.HumanoidStateType.Landed == newState then NumberOfJumpsInARow = 0 CanPlayerJump = false elseif Enum.HumanoidStateType.Freefall == newState then task.wait(JumpCooldown) CanPlayerJump = true elseif Enum.HumanoidStateType.Jumping == newState then CanPlayerJump = false NumberOfJumpsInARow += 1 end
Amazing tutorial, your gonna reach 10k soon!🎉
Thanks :)
thx bro, with videos like these youll be hitting 10k in no time
Thank you :)
how would I add an animation and a sound effect to it?
Make a anim then do local Anim = --your anim
Anim:Play() and for sound is same
Check out my beginner-to-pro scripting series here! th-cam.com/play/PLAgNoIvrYttz9raCi0NfECIiXcFe97FRu.html
Comment what videos you want me to make here!
yo this is super cool and it works fine but next time please tell us what type of script i should insert as i inserted a normal one but it didn't work, about 30 mins later actually realized that it was a local script, great tutorial though!
local MaxJumps = 2
local JumpCooldown = 0.2
local UserInputService = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local NumberOfJumpsInARow = 0
local CanPlayerJump = false
Humanoid.StateChanged:connect(function(oldState, newState)
if Enum.HumanoidStateType.Landed == newState then
NumberOfJumpsInARow = 0
CanPlayerJump = false
elseif Enum.HumanoidStateType.Freefall == newState then
task.wait(JumpCooldown)
CanPlayerJump = true
elseif Enum.HumanoidStateType.Jumping == newState then
CanPlayerJump = false
NumberOfJumpsInARow += 1
end
end)
UserInputService.JumpRequest:Connect(function()
if CanPlayerJump and NumberOfJumpsInARow < MaxJumps then
Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
end
end)
(((what am i doing wrong here? i followed everything to the letter. thank you for the tutorial btw :)))
found the problem... I put it in a server script instead of a local script. Thanks again :D
i did something wrong so i scrolled and copied this one and now it works thanks for making one because am making a 2006 roblox version of the game:D
thx so much fo this
How would you go on about increasing the Jump Height?
You can set the Humanoid.JumpHeight to a higher number in the script
@@Scrip_tix Thank you
Awesome video but how do I add animation to it when it double jump?
When ur famous remember meee!
Yessir! 🫡
Interesting! but I have a question isn't the landed stateType supposed to turn canplayerjump to true ? since the player is on the ground
First of all, thanks for the tutorial, greetings from Mexico.
One question, do you know how to make sure that when jumping from a bag in the air, I want it for my speedrun game please 🙏
hey if i wanted too how do i add a different animation to the second jump?
Hey! It didn’t work for some reason even though I checked I put everything correctly I think it might be in the 21st row I can’t tell if it says “NumberOfJumpsInARow += 1”. Or if it says “NumberOfJumpsInARow = 1” Or if it’s “NumberOfJumpsInARow = 1” if you could tell me that would be GREAT
NumberOfJumpsInARow += 1
ty
da best tutorial for double jump, i've ever seen :)
Glad it helped! :)
You are so underrated
Thank you!
best roblox scripter! 🏆🏆
idk if i did soming worge but this didnt work
im sorry
How does this guy have only 200 subs?!
Appreciate you :)
Awsome tutorial! Altought i have a problem. The code works but im double jumping infinitly and i wrote the script word to word and i even triple checked it but it still double jumps infinitly
Can you show me your code?
@@Scrip_tix i just copy and pasted someone elses code and fixed the problem, its good now.
@@PowerTuner what code did you copy and paste? I'm having the same issue.
I fixed it with chat gpt
i still dont understand scripting why is it soo difficultt
If you need help, check out my beginner's scripting series here: th-cam.com/play/PLAgNoIvrYttz9raCi0NfECIiXcFe97FRu.html
@@Scrip_tix okii
scripting is really difficult at the start and may vary weeks or months before you barely get the hang of it
@@Scrip_tix i tried it and it does not work
Next Tutorial = How to make a double jump gamepass in roblox studio!
I will definitely keep this in mind as a future video :)
just make a script that checks if the player has the gamepass on join, and if true then it enables the double jump script; the double jump script should be disabled by default
@@Scrip_tix I know how to make the double jump gamepass, Just to help you get audience :)
This guy needs more then 3k subs
Can other players see the double jump cuz its a local script ?
Thank You!!!
You're welcome!
remember me when your big
Same lol
Mine won’t work and I don’t don’t know what it could be, please I need help
Copy paste and put it in local script
@ thanks
It works well until the player dies or resets and it stops
Can you show me your code?
thanks i was making a 2006 like game
Could you add script parts in description not the full script but parts of it please
If you are having issues, you can paste it here and I can take a look at it for you if you want :)
@@Scrip_tix I rewatched the video. Now it works. Do you know how i add animations to my secound jump? "local MaxJumps = 2
local JumpCooldown = 0.2
local UserInputService = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.Character:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local NumberOfJumpsInARow = 0
local CanPlayerJump = false
Humanoid.StateChanged:Connect(function(oldState, newState)
if Enum.HumanoidStateType.Landed == newState then
NumberOfJumpsInARow = 0
CanPlayerJump = false
elseif Enum.HumanoidStateType.Freefall == newState then
task.wait(JumpCooldown)
CanPlayerJump = true
elseif Enum.HumanoidStateType.Jumping == newState then
CanPlayerJump = false
NumberOfJumpsInARow -= 1
end
end)
UserInputService.JumpRequest:Connect(function()
if CanPlayerJump and NumberOfJumpsInARow < MaxJumps then
Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
end
end)"
@@Scrip_tixnvm what happened after i commented this but i have infinity jumps now :(
NumberOfJumpsInARow -= 1 should be NumberOfJumpsInARow += 1
@@Scrip_tix oh thanks. Where in the code should i add animations? Or can you even do a video of it i would appreciate that hah
It doesn’t work for me idk why
Attempt to index nil with 'character'
BRO IT DOSENT WORK.... WHYYYYYYYYYYYYYYYYYYYYYYY............. i hate my pc bro
This does not work
______________
local MaxJumps = 2
local JumpCooldown = 0.2
local inputservice = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local NumberofJumps = 0
local canjump = false
Humanoid.StateChanged:Connect(function(oldtate, newstate)
if Enum.HumanoidStateType.Landed == newstate then
NumberofJumps = 0
canjump = false
elseif Enum.HumanoidStateType.Freefall == newstate then
task.wait(JumpCooldown)
NumberofJumps += 1
end
end)
inputservice.JumpRequest:Connect(function()
if canjump and NumberofJumps < MaxJumps then
Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
end
end)
local MaxJumps = 2
local JumpCooldown = 0.1
local UserInputService = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local NumberOfJumpsInARow = 0
local CanPlayerJump = false
Humanoid.stateChanged:Connect(function(oldState, newState)
if Enum.HumanoidStateType.Landed == newState then
NumberOfJumpsInARow = 0
CanPlayerJump = false
elseif Enum.HumanoidStateType.Freefall == newState then
task.wait(JumpCooldown)
CanPlayerJump = true
elseif Enum.HumanoidStateType.Jumping == newState then
CanPlayerJump = false
NumberOfJumpsInARow += 1
end
end)
UserInputService.JumpRequest:Connect(function()
if CanPlayerJump and NumberOfJumpsInARow < MaxJumps then
Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
end
end)
Should be something like this
how do u add a jump animation like in bladeball?
make an animation, copy it and paste it in the localscript
just learn scripting bruh, its easy when yk how to script
@@KevinsGotAimeasy for you to say buster
Does this script work for r6?
Works for both :3
thx + sub
it did not work for me:(
Can you show me your code?
didn't work sadly😓😭
Can you show me your code?
Mabye you need to put it in a local script that was the problem I faced
thanks for this awesome tutorial, new sub! Btw can someone help me fix this doesnt work:
local MaxJumps = 2
local JumpCooldown = 0.2
local UserInputService = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:wait()
local humanoid = Character:WaitForChild("humanoid")
local NumberOfJumpsInARow = 0
local CanPlayerJump = false
humanoid.StateChanged:Connect(function(oldState, NewState)
if Enum.HumanoidStateType.Landed == NewState then
NumberOfJumpsInARow = 0
CanPlayerJump = false
elseif Enum.HumanoidStateType.Freefall == NewState then
task.wait(JumpCooldown)
CanPlayerJump = true
elseif Enum.HumanoidStateType.Jumping == NewState then
CanPlayerJump = false
NumberOfJumpsInARow = 1
end
end)
UserInputService.JumpRequest:Connect(function()
if CanPlayerJump and NumberOfJumpsInARow < MaxJumps then
humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
end
end)
Thank you :)
local humanoid = Character:WaitForChild("humanoid")
Humanoid has to be capitalized. So it should be:
local humanoid = Character:WaitForChild("Humanoid")
----------------------------------------- Settings
local MaxJumps = 2
local JumpCooldown = 2.0
----------------------------------------- Settings
local UIS = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
local Char = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Char:WaitForChild("Humanoid")
local NumJumps = 0
local canjump = false
Humanoid.StateChanged:Connect(function(oldstate, newstate)
if Enum.HumanoidStateType.Landed == newstate then
NumJumps = 0
canjump = false
elseif Enum.HumanoidStateType.Freefall == newstate then
wait(JumpCooldown)
canjump = true
elseif Enum.HumanoidStateType.Jumping == newstate then
canjump = false
NumJumps += 1
end
end)
UIS.JumpRequest:Connect(function()
if canjump and NumJumps < MaxJumps then
Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
end
end)
nice tutorial but can someone help me find out what wrong with is code
local MaxJumps = 2
local JumpCooldown = 0.2
local UserInputService = game:GetService("UserInputService")
local Player = game.Players.localPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local NumberOfJumpsInARow = 0
local CanPlayerJump = false
Humanoid.StateChanged:Connect(function(oldState, newState)
if Enum.HumanoidStateType.Landed == newState then
NumberOfJumpsInARow = 0
CanPlayerJump = false
elseif Enum.HumanoidStateType.Freefall == newState then
task.wait(JumpCooldown)
CanPlayerJump = false
elseif Enum.HumanoidStateType.Jumping == newState then
CanPlayerJump = false
NumberOfJumpsInARow += 1
end
end)
UserInputService.JumpRequest:Connect(function()
if CanPlayerJump and NumberOfJumpsInARow < MaxJumps then
Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
end
end)
under this section:
elseif Enum.HumanoidStateType.Freefall == newState then
task.wait(JumpCooldown)
CanPlayerJump = false
you wrote 'CanPlayerJump = false' when it should be true, change that and it should work :)
mine never works
local MaxJumps = 2
local JumpCooldown = 0.2
local UserInputService = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local NumberOfJumpsInARow = 0
local CanPlayerJump = false
Humanoid.StateChanged:Connect(function(oldState, newState)
if Enum.HumanoidStateType.Landed == newState then
NumberOfJumpsInARow = 0
CanPlayerJump = false
elseif Enum.HumanoidStateType.Freefall == newState then
task.wait(JumpCooldown)
CanPlayerJump = true
elseif Enum.HumanoidStateType.Jumping == newState then
CanPlayerJump = false
NumberOfJumpsInARow += 1
end
end)
UserInputService.JumpRequest:Connect(function()
if CanPlayerJump and NumberOfJumpsInARow < MaxJumps then
Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
end
end)
if u want just the script
Thank you broo