How to make a DOUBLE JUMP script - ROBLOX Studio

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ม.ค. 2025

ความคิดเห็น • 93

  • @NathanLegacy
    @NathanLegacy ปีที่แล้ว +5

    Amazing tutorial, your gonna reach 10k soon!🎉

  • @VelocityCubedd
    @VelocityCubedd ปีที่แล้ว +2

    thx bro, with videos like these youll be hitting 10k in no time

  • @lil_lam-69
    @lil_lam-69 6 หลายเดือนก่อน +4

    how would I add an animation and a sound effect to it?

    • @prajaktakharat7761
      @prajaktakharat7761 2 หลายเดือนก่อน +1

      Make a anim then do local Anim = --your anim
      Anim:Play() and for sound is same

  • @Scrip_tix
    @Scrip_tix  ปีที่แล้ว +5

    Check out my beginner-to-pro scripting series here! th-cam.com/play/PLAgNoIvrYttz9raCi0NfECIiXcFe97FRu.html
    Comment what videos you want me to make here!

  • @David360playz
    @David360playz 6 หลายเดือนก่อน +2

    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!

  • @CaliPlays5651
    @CaliPlays5651 ปีที่แล้ว +14

    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 :)))

    • @CaliPlays5651
      @CaliPlays5651 ปีที่แล้ว +1

      found the problem... I put it in a server script instead of a local script. Thanks again :D

    • @Pyro_the-animatior
      @Pyro_the-animatior 4 หลายเดือนก่อน

      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

    • @Him_ofc
      @Him_ofc หลายเดือนก่อน

      thx so much fo this

  • @kshaze484
    @kshaze484 10 หลายเดือนก่อน +2

    How would you go on about increasing the Jump Height?

    • @Scrip_tix
      @Scrip_tix  10 หลายเดือนก่อน +2

      You can set the Humanoid.JumpHeight to a higher number in the script

    • @kshaze484
      @kshaze484 10 หลายเดือนก่อน +1

      @@Scrip_tix Thank you

  • @Sk8terr
    @Sk8terr 5 หลายเดือนก่อน +1

    Awesome video but how do I add animation to it when it double jump?

  • @the_epokgaminchair6487
    @the_epokgaminchair6487 ปีที่แล้ว +2

    When ur famous remember meee!

  • @MelioAwake
    @MelioAwake 9 หลายเดือนก่อน

    Interesting! but I have a question isn't the landed stateType supposed to turn canplayerjump to true ? since the player is on the ground

  • @Robloxt1k
    @Robloxt1k ปีที่แล้ว +2

    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 🙏

  • @Ray_migh
    @Ray_migh 6 หลายเดือนก่อน

    hey if i wanted too how do i add a different animation to the second jump?

  • @icylol7426
    @icylol7426 10 หลายเดือนก่อน

    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

    • @kshaze484
      @kshaze484 10 หลายเดือนก่อน +1

      NumberOfJumpsInARow += 1

    • @icylol7426
      @icylol7426 10 หลายเดือนก่อน

      ty

  • @shniga
    @shniga ปีที่แล้ว +1

    da best tutorial for double jump, i've ever seen :)

    • @Scrip_tix
      @Scrip_tix  ปีที่แล้ว +1

      Glad it helped! :)

  • @Ryveex
    @Ryveex ปีที่แล้ว +2

    You are so underrated

  • @FlipaMan-fs7kl
    @FlipaMan-fs7kl หลายเดือนก่อน +2

    best roblox scripter! 🏆🏆

  • @funndinplayz
    @funndinplayz 5 หลายเดือนก่อน +1

    idk if i did soming worge but this didnt work
    im sorry

  • @squirrellovesttd
    @squirrellovesttd ปีที่แล้ว +1

    How does this guy have only 200 subs?!

    • @Scrip_tix
      @Scrip_tix  ปีที่แล้ว +1

      Appreciate you :)

  • @PowerTuner
    @PowerTuner 5 หลายเดือนก่อน +1

    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

    • @Scrip_tix
      @Scrip_tix  5 หลายเดือนก่อน +2

      Can you show me your code?

    • @PowerTuner
      @PowerTuner 5 หลายเดือนก่อน +1

      @@Scrip_tix i just copy and pasted someone elses code and fixed the problem, its good now.

    • @notnooby2118
      @notnooby2118 3 หลายเดือนก่อน

      @@PowerTuner what code did you copy and paste? I'm having the same issue.

    • @PowerTuner
      @PowerTuner 3 หลายเดือนก่อน

      I fixed it with chat gpt

  • @ShahjamalAhmed
    @ShahjamalAhmed ปีที่แล้ว +1

    i still dont understand scripting why is it soo difficultt

    • @Scrip_tix
      @Scrip_tix  ปีที่แล้ว +1

      If you need help, check out my beginner's scripting series here: th-cam.com/play/PLAgNoIvrYttz9raCi0NfECIiXcFe97FRu.html

    • @ShahjamalAhmed
      @ShahjamalAhmed ปีที่แล้ว +1

      @@Scrip_tix okii

    • @ben252
      @ben252 ปีที่แล้ว +1

      scripting is really difficult at the start and may vary weeks or months before you barely get the hang of it

    • @danielsai
      @danielsai 8 หลายเดือนก่อน

      @@Scrip_tix i tried it and it does not work

  • @LaxmisudhaB
    @LaxmisudhaB ปีที่แล้ว +1

    Next Tutorial = How to make a double jump gamepass in roblox studio!

    • @Scrip_tix
      @Scrip_tix  ปีที่แล้ว +1

      I will definitely keep this in mind as a future video :)

    • @-fat
      @-fat ปีที่แล้ว

      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

    • @LaxmisudhaB
      @LaxmisudhaB ปีที่แล้ว

      @@Scrip_tix I know how to make the double jump gamepass, Just to help you get audience :)

  • @Mr.RedWave
    @Mr.RedWave 3 หลายเดือนก่อน

    This guy needs more then 3k subs

  • @VoltCode-r4i
    @VoltCode-r4i 2 หลายเดือนก่อน

    Can other players see the double jump cuz its a local script ?

  • @GsDevStudio
    @GsDevStudio 10 หลายเดือนก่อน +1

    Thank You!!!

    • @Scrip_tix
      @Scrip_tix  10 หลายเดือนก่อน

      You're welcome!

  • @resett_1483
    @resett_1483 ปีที่แล้ว +2

    remember me when your big

    • @Ryveex
      @Ryveex ปีที่แล้ว

      Same lol

  • @LIGHTNlNGGOD
    @LIGHTNlNGGOD 5 หลายเดือนก่อน

    Mine won’t work and I don’t don’t know what it could be, please I need help

    • @Derik-y2f
      @Derik-y2f 2 หลายเดือนก่อน

      Copy paste and put it in local script

    • @LIGHTNlNGGOD
      @LIGHTNlNGGOD 2 หลายเดือนก่อน

      @ thanks

  • @ahmedeljayidi488
    @ahmedeljayidi488 7 หลายเดือนก่อน

    It works well until the player dies or resets and it stops

    • @Scrip_tix
      @Scrip_tix  7 หลายเดือนก่อน

      Can you show me your code?

  • @Pyro_the-animatior
    @Pyro_the-animatior 4 หลายเดือนก่อน

    thanks i was making a 2006 like game

  • @astbrast1058
    @astbrast1058 ปีที่แล้ว

    Could you add script parts in description not the full script but parts of it please

    • @Scrip_tix
      @Scrip_tix  ปีที่แล้ว +1

      If you are having issues, you can paste it here and I can take a look at it for you if you want :)

    • @astbrast1058
      @astbrast1058 ปีที่แล้ว

      @@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)"

    • @astbrast1058
      @astbrast1058 ปีที่แล้ว

      @@Scrip_tixnvm what happened after i commented this but i have infinity jumps now :(

    • @Scrip_tix
      @Scrip_tix  ปีที่แล้ว +1

      NumberOfJumpsInARow -= 1 should be NumberOfJumpsInARow += 1

    • @astbrast1058
      @astbrast1058 ปีที่แล้ว

      @@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

  • @whatsaname2usern
    @whatsaname2usern 4 หลายเดือนก่อน

    It doesn’t work for me idk why

  • @tylerbaker509
    @tylerbaker509 5 หลายเดือนก่อน

    Attempt to index nil with 'character'

  • @emadecor714
    @emadecor714 19 วันที่ผ่านมา

    BRO IT DOSENT WORK.... WHYYYYYYYYYYYYYYYYYYYYYYY............. i hate my pc bro

  • @Ghostlyrbx
    @Ghostlyrbx 6 หลายเดือนก่อน

    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)

    • @Sk8terr
      @Sk8terr 5 หลายเดือนก่อน +1

      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

  • @deecor
    @deecor ปีที่แล้ว

    how do u add a jump animation like in bladeball?

    • @Ilikegoodham
      @Ilikegoodham 9 หลายเดือนก่อน +1

      make an animation, copy it and paste it in the localscript

    • @KevinsGotAim
      @KevinsGotAim 6 หลายเดือนก่อน

      just learn scripting bruh, its easy when yk how to script

    • @Fat_chicken_is_everywhere
      @Fat_chicken_is_everywhere 5 หลายเดือนก่อน +2

      @@KevinsGotAimeasy for you to say buster

  • @ACLvolleyball-2
    @ACLvolleyball-2 ปีที่แล้ว

    Does this script work for r6?

    • @Scrip_tix
      @Scrip_tix  ปีที่แล้ว

      Works for both :3

  • @FeelingLikeYesterday
    @FeelingLikeYesterday 11 หลายเดือนก่อน +1

    thx + sub

  • @mariogosiengfiao1784
    @mariogosiengfiao1784 9 หลายเดือนก่อน

    it did not work for me:(

    • @Scrip_tix
      @Scrip_tix  9 หลายเดือนก่อน

      Can you show me your code?

  • @ploobMC
    @ploobMC 10 หลายเดือนก่อน

    didn't work sadly😓😭

    • @Scrip_tix
      @Scrip_tix  10 หลายเดือนก่อน

      Can you show me your code?

    • @saintolengrace546
      @saintolengrace546 9 หลายเดือนก่อน

      Mabye you need to put it in a local script that was the problem I faced

  • @BaxDimes
    @BaxDimes ปีที่แล้ว +1

    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)

    • @Scrip_tix
      @Scrip_tix  ปีที่แล้ว +1

      Thank you :)

    • @Scrip_tix
      @Scrip_tix  ปีที่แล้ว

      local humanoid = Character:WaitForChild("humanoid")
      Humanoid has to be capitalized. So it should be:
      local humanoid = Character:WaitForChild("Humanoid")

  • @Wissenswert4531
    @Wissenswert4531 3 หลายเดือนก่อน

    ----------------------------------------- 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)

  • @SpaceKid999
    @SpaceKid999 ปีที่แล้ว

    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)

    • @Scrip_tix
      @Scrip_tix  ปีที่แล้ว

      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 :)

  • @janay173
    @janay173 หลายเดือนก่อน

    mine never works

  • @gamergab8484
    @gamergab8484 4 หลายเดือนก่อน

    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

    • @MixZss
      @MixZss หลายเดือนก่อน

      Thank you broo