How to make a DASH SYSTEM in Roblox Studio 2024!

Поделиться
HTML-код
  • Опубликовано: 13 сен 2024

Комментарии • 117

  • @BigPicsxeDude
    @BigPicsxeDude 22 дня назад +6

    if anyone is to lazy
    local uis = game:GetService("UserInputService")
    local player = game.Players.LocalPlayer
    local mouse = player:GetMouse()
    local char = player.Character or player.CharacterAdded:Wait()
    local hrp = char:WaitForChild("HumanoidRootPart")
    local debounce = false
    local Wkey = false
    local Akey = false
    local Skey = false
    local Dkey = false
    mouse.KeyDown:Connect(function(key)
    if key == "w" then
    Wkey = true
    elseif key == "a" then
    Akey = true
    elseif key == "s" then
    Skey = true
    elseif key == "d" then
    Dkey = true
    end
    end)
    mouse.KeyUp:Connect(function(key)
    if key == "w" then
    Wkey = false
    elseif key == "a" then
    Akey = false
    elseif key == "s" then
    Skey = false
    elseif key == "d" then
    Dkey = false
    end
    end)
    uis.InputBegan:Connect(function(input, gameProcessed)
    if gameProcessed then return end
    if input.KeyCode == Enum.KeyCode.E and not debounce then
    debounce = true
    local vel = Instance.new("BodyVelocity")
    vel.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
    if Wkey then
    vel.Velocity = hrp.CFrame.LookVector * 100
    elseif Akey then
    vel.Velocity = hrp.CFrame.RightVector * -100
    elseif Skey then
    vel.Velocity = hrp.CFrame.RightVector * 100
    else
    vel.Velocity = Vector3.new(0, 0, 0)
    end
    vel.Parent = hrp
    game.Debris:AddItem(vel, 0.2)
    wait(1)
    debounce = false
    end
    end)

    • @unomasunohjnds
      @unomasunohjnds 12 дней назад

      thanks

    • @BigPicsxeDude
      @BigPicsxeDude 12 дней назад

      @@unomasunohjnds your welcome also there is a little bit broken on the script but it's not that bad it still mostly works because I didn't fully follow the tutorial.

  • @beaney2211
    @beaney2211 14 дней назад +3

    0:49 bro's grades are better than mine

  • @SnowLord_YT
    @SnowLord_YT 2 месяца назад +3

    THANKS U SO MUCH, I have did ur sword attack tutorial and it was very good,so thank u for this tutorial!🎉

  • @henriquebigolin2006
    @henriquebigolin2006 2 месяца назад +3

    Thank you broooo, u make it so simple i understand everything

  • @xXTinyRealXx
    @xXTinyRealXx 2 месяца назад +1

    Bro your intros are always fire, love it

  • @zink-dev
    @zink-dev Месяц назад +3

    the only thing that could be a flaw in this is using body velocity since its depricated. But nice tutorial.

    • @devmelonroblox
      @devmelonroblox  Месяц назад

      I guess

    • @vrfrenzy8451
      @vrfrenzy8451 Месяц назад

      body velocity may be depricated but it works perfectly fine, it just doesn't work on attachments like the new systems do (at least this is what I have seen from a bit of research)

    • @kingbluedash
      @kingbluedash 23 дня назад +1

      LinearVelocity has replaced it, although it's a bit broken, as when i used DevMelon's slide tutorial it started to fling my avatar whenever i tried to slide (which the solution to that was using roblox's new physics character controller.)

  • @Mateuzfc
    @Mateuzfc 2 месяца назад +1

    Hello Bro, your content is good, don't stop.👍

  • @user-jr5it6ew1l
    @user-jr5it6ew1l 2 месяца назад +1

    Nice vid it will help me alot

  • @neosepp3956
    @neosepp3956 2 месяца назад +2

    Pretty new in coding (like new-born baby new) so how can i add my own animations in the dashes, plz help :)

    • @ItzVen6
      @ItzVen6 Месяц назад +1

      You need to provide the assest Id of your animations that you have published to Roblox, make sure you publish it as a group owned animation and not a animation created by you to avoid future complications. Hope this helps

    • @JetReaper
      @JetReaper 13 дней назад

      yeah, same issue

  • @RagedCascade359
    @RagedCascade359 2 месяца назад +1

    Nice video! BTW what does body velocity do?

  • @DJAnude
    @DJAnude 2 месяца назад

    "Wow! AI just did the whole script for me, but im not lazy so-"
    BUT I AMMMMMMM

  • @Drxpyoutube
    @Drxpyoutube 2 месяца назад +4

    local UIS = game;GetService("UserInputService")
    local Player = game.Players.LocalPlayer
    local mouse = Player:GetMouse()
    local char = script.Parent
    local HRP = Char:WaitForChild("HumanoidRootPart")
    local debounce = false
    local WKey = false
    local AKey = false
    local SKey = false
    local DKey = false
    Mouse.KeyDown:Connect(function(key)
    if key == "w" then
    WKey = true
    elseif key == "a" then
    AKey = true
    elseif key == "s" then
    SKey = true
    elseif key == "d" then
    DKey = true
    end
    end)
    Mouse.KeyUp:Connect(function(key)
    if key == "w" then
    WKey = false
    elseif key == "a" then
    AKey = false
    elseif key == "s" then
    SKey = false
    elseif key == "d" then
    DKey = false
    end
    end)
    UIS.InputBegan:Connect(function(key)
    if key.KeyCode == Enum.KeyCode.E then
    if WKey == true then
    if debounce == false then
    local vel = Instance.new("BodyVelocity",HRP)
    vel.MaxForce = Vector3.new(math.huge,0,0,math.huge)
    vel.Velocity = HRP.CFrame.lookVector*100
    game.Debris:AddItem(vel,.2)
    wait(1)
    debounce = false
    end
    elseif AKey == true then
    if debounce == false then
    local vel = Instance.new("BodyVelocity",HRP)
    vel.MaxForce = Vector3.new(math.huge,0,0,math.huge)
    vel.Velocity = HRP.CFrame.RightVector*-100
    game.Debris:AddItem(vel,.2)
    wait(1)
    debounce = false
    end
    elseif SKey == true then
    if debounce == false then
    local vel = Instance.new("BodyVelocity",HRP)
    vel.MaxForce = Vector3.new(math.huge,0,0,math.huge)
    vel.Velocity = HRP.CFrame.LookVector*-100
    game.Debris:AddItem(vel,.2)
    wait(1)
    debounce = false
    end
    elseif DKey == true then
    if debounce == false then
    local vel = Instance.new("BodyVelocity",HRP)
    vel.MaxForce = Vector3.new(math.huge,0,0,math.huge)
    vel.Velocity = HRP.CFrame.RightVector*100
    game.Debris:AddItem(vel,.2)
    wait(1)
    debounce = false
    end
    end
    end

    • @devmelonroblox
      @devmelonroblox  2 месяца назад

      You make a couple typos in the script

    • @Drxpyoutube
      @Drxpyoutube 2 месяца назад

      @@devmelonrobloxcan u fix the script and resend the fixed script

    • @devmelonroblox
      @devmelonroblox  2 месяца назад

      @@Drxpyoutube at the start where you did local UIS instead of ; do :

    • @Drxpyoutube
      @Drxpyoutube 2 месяца назад

      Still didnt work

    • @Drxpyoutube
      @Drxpyoutube 2 месяца назад

      Says Workspace.guap4088.LocalScript:77: Expected ‘end’ (to close ‘function’ at line 36), got ; did you forget to close ‘then at line 66

  • @INN_FINITYY
    @INN_FINITYY Месяц назад +2

    thanks but what key do i press to dash?

    • @bacon_craft385
      @bacon_craft385 Месяц назад +2

      E you can also change it at string 37 after "Enum.KeyCode.(your key)"

    • @FootballFactsss
      @FootballFactsss Месяц назад

      @@bacon_craft385 can you make it so you double tap space bar and how will it work for mobile users?

    • @INN_FINITYY
      @INN_FINITYY Месяц назад +1

      It doesn’t work😭

  • @DarkIXsPlays
    @DarkIXsPlays Месяц назад

    Tysm this work

  • @GreatNickyJ
    @GreatNickyJ 12 дней назад

    How do i add an animation to the dash?

  • @BattleCompanionsGames
    @BattleCompanionsGames 2 месяца назад +1

    YESSS

  • @IHaveNoIdea_.
    @IHaveNoIdea_. Месяц назад

    is there a way to attach a animation onto it, i am a starter scripter and this would help alot.

  • @bartoszzyka9792
    @bartoszzyka9792 2 месяца назад

    Can you make a boomerang weapon basicly a throw weapon that comes back

    • @devmelonroblox
      @devmelonroblox  2 месяца назад

      I sure might make a vid on this soon

  • @Friskerlover
    @Friskerlover 15 дней назад

    It works but when i click s i dash to the right and when i click d nothing happens

  • @bacon_craft385
    @bacon_craft385 Месяц назад

    how do i also apply animations to it? i want to make dashes with animations

  • @MuhammadAamir94
    @MuhammadAamir94 2 месяца назад +1

    i did everything step by step but script didnt work and nothings happening.

  • @delustopia
    @delustopia Месяц назад +1

    can you tell me what mic you use?

    • @devmelonroblox
      @devmelonroblox  Месяц назад

      I use some random mic i found in my house i dont even know the name of it ahahah

    • @devmelonroblox
      @devmelonroblox  Месяц назад

      I think its a Mackie em-usb

    • @delustopia
      @delustopia Месяц назад

      @@devmelonroblox love ur vids btw just added a dash system to my game

  • @Years12317
    @Years12317 27 дней назад

    4:28

  • @happyperkiness746
    @happyperkiness746 2 месяца назад +1

    How can you modify this script to include an animation that plays when you dash in certain directions ?

    • @devmelonroblox
      @devmelonroblox  2 месяца назад

      When you add the bodyvelocity you do
      anim = Humanoid:LoadAnimation(Animation)
      anim:Play()

    • @happyperkiness746
      @happyperkiness746 2 месяца назад +1

      @@devmelonrobloxokay thank you :)

    • @turtledude8852
      @turtledude8852 Месяц назад

      @@devmelonroblox erm it says unknown global humanoid and animation you think you could help me with that?

    • @turtledude8852
      @turtledude8852 Месяц назад

      @@happyperkiness746hey did this work for you??

  • @MansiShah111
    @MansiShah111 22 дня назад

    Does this work on the server side?¿

  • @Shernxuengoh
    @Shernxuengoh 2 месяца назад +1

    help! I did everything right but nothing happend what should i do?

    • @devmelonroblox
      @devmelonroblox  2 месяца назад

      @@Shernxuengoh then you didn’t do everything right check your output and tell me the error you get

  • @SpiderDev-n4e
    @SpiderDev-n4e 25 дней назад

    How do you make it play an animation?

  • @sinadostewelde7317
    @sinadostewelde7317 2 месяца назад +2

    Does the game have to be R15 or R6?

    • @Sakplayer
      @Sakplayer 2 месяца назад

      no

    • @sinadostewelde7317
      @sinadostewelde7317 Месяц назад

      @@Sakplayer Wdym by that?

    • @Sakplayer
      @Sakplayer Месяц назад

      @@sinadostewelde7317 I think you ask about the game should R15 or R6 to make dash system. Well it doesn't matter to have R15 or R6 to make dash

  • @user-animation0000
    @user-animation0000 Месяц назад +1

    Bro is that for R6 too?

  • @airsjorderns
    @airsjorderns 6 дней назад

    Heres the full script
    local UIS = game:GetService("UserInputService")
    local player = game.Players.LocalPlayer
    local Mouse = player:GetMouse()
    local char = script.Parent
    local HRP = char:WaitForChild("HumanoidRootPart")
    local debounce = false
    local WKey = false
    local AKey = false
    local SKey = false
    local DKey = false
    Mouse.KeyDown:Connect(function(key)
    if key == "w" then
    WKey = true
    elseif key == "a" then
    AKey = true
    elseif key == "s" then
    SKey = true
    elseif key == "d" then
    DKey = true
    end
    end)
    Mouse.KeyUp:Connect(function(key)
    if key == "w" then
    WKey = false
    elseif key == "a" then
    AKey = false
    elseif key == "s" then
    SKey = false
    elseif key == "d" then
    DKey = false
    end
    end)
    UIS.InputBegan:Connect(function(Key, gameProcessedEvent)
    if gameProcessedEvent then return end -- Prevent action if the game processes the event
    if Key.KeyCode == Enum.KeyCode.E and not debounce then
    local vel = Instance.new("BodyVelocity")
    vel.MaxForce = Vector3.new(math.huge, 0, math.huge)
    if WKey then
    vel.Velocity = HRP.CFrame.LookVector * 100
    elseif AKey then
    vel.Velocity = HRP.CFrame.RightVector * -100
    elseif SKey then
    vel.Velocity = HRP.CFrame.LookVector * -100
    elseif DKey then
    vel.Velocity = HRP.CFrame.RightVector * 100
    end
    vel.Parent = HRP
    game.Debris:AddItem(vel, 0.2)
    debounce = true
    wait(1)
    debounce = false
    end
    end)

  • @GoroExility
    @GoroExility 10 дней назад

    Why doesnt anything that i do from tutorials not work can u tell me why pls

    • @devmelonroblox
      @devmelonroblox  10 дней назад

      Probably spelling mistakes like capital letters check your output for errors

  • @0NIXXZZ
    @0NIXXZZ 2 месяца назад +1

    can u give me the script so i dont have to write it down ;-; ? THANK U

    • @roccosebastian9004
      @roccosebastian9004 2 месяца назад +1

      Ppl do this so other ppl actually watch the video

    • @Lockin_Vrgt
      @Lockin_Vrgt 2 месяца назад +1

      local UIS = game;GetService("UserInputService")
      local Player = game.Players.LocalPlayer
      local mouse = Player:GetMouse()
      local char = script.Parent
      local HRP = Char:WaitForChild("HumanoidRootPart")
      local debounce = false
      local WKey = false
      local AKey = false
      local SKey = false
      local DKey = false
      Mouse.KeyDown:Connect(function(key)
      if key == "w" then
      WKey = true
      elseif key == "a" then
      AKey = true
      elseif key == "s" then
      SKey = true
      elseif key == "d" then
      DKey = true
      end
      end)
      Mouse.KeyUp:Connect(function(key)
      if key == "w" then
      WKey = false
      elseif key == "a" then
      AKey = false
      elseif key == "s" then
      SKey = false
      elseif key == "d" then
      DKey = false
      end
      end)
      UIS.InputBegan:Connect(function(key)
      if key.KeyCode == Enum.KeyCode.E then
      if WKey == true then
      if debounce == false then
      local vel = Instance.new("BodyVelocity",HRP)
      vel.MaxForce = Vector3.new(math.huge,0,0,math.huge)
      vel.Velocity = HRP.CFrame.lookVector*100
      game.Debris:AddItem(vel,.2)
      wait(1)
      debounce = false
      end
      elseif AKey == true then
      if debounce == false then
      local vel = Instance.new("BodyVelocity",HRP)
      vel.MaxForce = Vector3.new(math.huge,0,0,math.huge)
      vel.Velocity = HRP.CFrame.RightVector*-100
      game.Debris:AddItem(vel,.2)
      wait(1)
      debounce = false
      end
      elseif SKey == true then
      if debounce == false then
      local vel = Instance.new("BodyVelocity",HRP)
      vel.MaxForce = Vector3.new(math.huge,0,0,math.huge)
      vel.Velocity = HRP.CFrame.LookVector*-100
      game.Debris:AddItem(vel,.2)
      wait(1)
      debounce = false
      end
      elseif DKey == true then
      if debounce == false then
      local vel = Instance.new("BodyVelocity",HRP)
      vel.MaxForce = Vector3.new(math.huge,0,0,math.huge)
      vel.Velocity = HRP.CFrame.RightVector*100
      game.Debris:AddItem(vel,.2)
      wait(1)
      debounce = false
      end
      end
      end

    • @0NIXXZZ
      @0NIXXZZ 2 месяца назад +2

      @@Lockin_Vrgt TYSMM

  • @LandonWhitman
    @LandonWhitman 2 месяца назад

    Redo how to make a worming sword jn Roblox

  • @beverlywilliams8815
    @beverlywilliams8815 Месяц назад

    I have the same code but every time I press E and any other key it doesn’t work

    • @croosh1467
      @croosh1467 17 дней назад

      you have to make an animation first

  • @MatiBugati
    @MatiBugati 14 дней назад

    Did not work, also heck you for not having the code in the description!

  • @randycpm
    @randycpm 5 дней назад

    It doesnt work and i have no errors

  • @turtledude8852
    @turtledude8852 Месяц назад

    I have no clue how to do this I copied it exactly and only added a few lines to add my own animation and it doesn’t work 😭😭

    • @croosh1467
      @croosh1467 17 дней назад

      u have to make an animation first

  • @CelestixBS
    @CelestixBS 20 дней назад

    I't doesn't work for me

  • @ylandro
    @ylandro 26 дней назад

    Can jou zet de script in de comments

  • @G12DG12D-jy6ym
    @G12DG12D-jy6ym 22 дня назад

    isnt body vel deprecated

  • @user-wq2wz2fq1x
    @user-wq2wz2fq1x 2 месяца назад

    can u put the script in the comments pls

  • @cjoliver7274
    @cjoliver7274 11 дней назад

    Did not work ):

  • @cap1ninja
    @cap1ninja 2 месяца назад

    can some one post the script in comments?

  • @Drxpyoutube
    @Drxpyoutube 2 месяца назад

    Abouta see if it works

    • @Drxpyoutube
      @Drxpyoutube 2 месяца назад

      Did not work

    • @devmelonroblox
      @devmelonroblox  2 месяца назад

      You sure you wrote it right did u get any errorsv

    • @Pwr_PlayzYT
      @Pwr_PlayzYT 2 месяца назад

      @@devmelonrobloxI wrote it right

  • @zmigal
    @zmigal 2 месяца назад +1

    2nd😢

  • @user-mu6ip3bw5i
    @user-mu6ip3bw5i Месяц назад

    script
    local UIS = game:GetService("UserInputService")
    local Player = game.Players.LocalPlayer
    local Mouse = Player:GetMouse()
    local Char = script.Parent
    local HRP = Char:WaitForChild("HumanoidRootPart")
    local debounce = false
    local WKey = false
    local AKey = false
    local SKey = false
    local DKey = false
    Mouse.KeyDown:Connect(function(key)
    if key == "w" then
    WKey = true
    elseif key == "a" then
    AKey = true
    elseif key == "s" then
    SKey = true
    elseif key == "d" then
    DKey = true
    end
    end)
    Mouse.KeyUp:Connect(function(key)
    if key == "w" then
    WKey = false
    elseif key == "a" then
    AKey = false
    elseif key == "s" then
    SKey = false
    elseif key == "d" then
    DKey = false
    end
    end)
    UIS.InputBegan:Connect(function(input, gameProcessed)
    if input.KeyCode == Enum.KeyCode.E then
    if WKey or AKey or SKey or DKey then
    if debounce == false then
    local vel = Instance.new("BodyVelocity", HRP)
    vel.MaxForce = Vector3.new(math.huge, 0, math.huge)

    if WKey then
    vel.Velocity = HRP.CFrame.LookVector * 100
    elseif AKey then
    vel.Velocity = -HRP.CFrame.RightVector * 100
    elseif SKey then
    vel.Velocity = -HRP.CFrame.LookVector * 100
    elseif DKey then
    vel.Velocity = HRP.CFrame.RightVector * 100
    end

    game.Debris:AddItem(vel, 0.2)
    debounce = true
    wait(0.5)
    debounce = false
    end
    end
    end
    end)
    Hope this help :)

  • @Pwr_PlayzYT
    @Pwr_PlayzYT 2 месяца назад +1

    JUST HAD ME WASTE MY TIME IT DIDNT WORK

    • @devmelonroblox
      @devmelonroblox  2 месяца назад +2

      Instead of saying it didn’t work say what actually didn’t work and what error you have so I could help

    • @Snasthesans
      @Snasthesans Месяц назад

      Skill issue

  • @user-wq2wz2fq1x
    @user-wq2wz2fq1x 2 месяца назад

    it doesnt work

    • @devmelonroblox
      @devmelonroblox  2 месяца назад

      What does work exactly saying it doesn’t work doesn’t help

  • @MansiShah111
    @MansiShah111 22 дня назад

    Does this work on the server side?¿

    • @smashthepie1759
      @smashthepie1759 22 дня назад

      do you mean would this work in a server script, or does it replicate to the server ?

  • @Lostmidnightegg
    @Lostmidnightegg 2 месяца назад

    local UIS = game:GetService("UserInputService")
    local Player = game.Players.LocalPlayer
    local Mouse = Player:GetMouse()
    local Char = script.Parent
    local HRP Char:WaitForChild("HumanoidRootPart")
    local debounce = false
    local WKey = false
    local AKey = false
    local SKey = false
    local DKey = false
    Mouse.KeyDown:Connect(function(key)
    if key == "w" then
    WKey = true
    elseif key == "a" then
    AKey = true
    elseif key == "s" then
    SKey = true
    elseif key == "d" then
    DKey = true
    end
    end)
    Mouse.KeyUp:Connect(function(key)
    if key == "w" then
    WKey = false
    elseif key == "a" then
    AKey = false
    elseif key == "s" then
    SKey = false
    elseif key == "d" then
    DKey = false
    end
    end)
    UIS.InputBegan:Connect(function(key)
    if key.KeyCode == Enum.KeyCode.C then
    if WKey == true then
    if debounce == false then
    local vel = Instance.new("BodyVelocity",HRP)
    vel.MaxForce = Vector3.new(math.huge,0,math.huge)
    vel.Velocity = HRP.CFrame.LookVector*100
    game.Debris:AddItem(vel,0.2)
    debounce = true
    wait(1)
    debounce = false
    end
    elseif AKey == true then
    if debounce == false then
    local vel = Instance.new("BodyVelocity",HRP)
    vel.MaxForce = Vector3.new(math.huge,0,math.huge)
    vel.Velocity = HRP.CFrame.RightVector*-100
    game.Debris:AddItem(vel,0.2)
    debounce = true
    wait(1)
    debounce = false
    end
    elseif SKey == true then
    if debounce == false then
    local vel = Instance.new("BodyVelocity",HRP)
    vel.MaxForce = Vector3.new(math.huge,0,math.huge)
    vel.Velocity = HRP.CFrame.LookVector*-100
    game.Debris:AddItem(vel,0.2)
    debounce = true
    wait(1)
    debounce = false
    end
    elseif DKey == true then
    if debounce == false then
    local vel = Instance.new("BodyVelocity",HRP)
    vel.MaxForce = Vector3.new(math.huge,0,math.huge)
    vel.Velocity = HRP.CFrame.RightVector*100
    game.Debris:AddItem(vel,0.2)
    debounce = true
    wait(1)
    debounce = false
    end
    end
    end
    end)
    Error :3: attempt to index nil with 'GetMouse'
    anywhere I made a mistake or typo?

    • @Snasthesans
      @Snasthesans Месяц назад

      W guy

    • @Reflecterr
      @Reflecterr 20 дней назад

      you forgot the "=" when classifying HRP as the humanoid root part