Roblox Studio - How to make Smooth Player Run Script

Поделиться
HTML-код
  • Опубликовано: 6 фев 2025
  • Script Below
    -- Services --
    local UIS = game:GetService("UserInputService")
    local TS = game:GetService("TweenService")
    -- Variables --
    local Player = game.Players.LocalPlayer
    local HUM = Player.Character:FindFirstChild("Humanoid")
    -- Settings --
    local RunSpeed = 30
    local BaseSpeed = 16
    local TransitionTime = 2
    local Key = "LeftShift"
    -- Script --
    UIS.InputBegan:Connect(function(input)
    if input.KeyCode == Enum.KeyCode[Key] then
    TS:Create(HUM, TweenInfo.new(TransitionTime), {WalkSpeed = RunSpeed}):Play()
    end
    end)
    UIS.InputEnded:Connect(function(input)
    if input.KeyCode == Enum.KeyCode[Key] then
    TS:Create(HUM, TweenInfo.new(TransitionTime), {WalkSpeed = BaseSpeed}):Play()
    end
    end)

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

  • @stars7438
    @stars7438  18 дней назад

    This video seems to do really well, I'm happy all of you are enjoying it and finding it useful. Be sure to check out my other videos.
    I made a new video about making a Smooth Camera, here is the link for it, I hope you'll enjoy it
    Roblox Studio - Smooth Camera : ruclips.net/video/x-aB_XgFRX4/видео.htmlsi=HsFFjdEfZPC3pxUL

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

    Straight to the point. Concise and easy to learn. Much thanks! Keep doing these tutorials. Love you man!

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

    Hvala puno brate na ovome

  • @ganeujt3578
    @ganeujt3578 19 дней назад +1

    Very nice video,you will go far

  • @7_GI
    @7_GI 19 дней назад +1

    thank you very much❤ + we need tutorial how to make shop dealer

    • @stars7438
      @stars7438  19 дней назад

      What kind of shop dealer were you thinking of? Would it be entirely GUI based or a mix of GUI and camera pointing to the thing you want to buy? Or perhaps similar to Lumber Tycoon 2 system where you drag items on the counter and buy them that way, It could also be done by pressing a button or clicking on items you want to buy that would trigger GUI for buying them?

    • @7_GI
      @7_GI 19 дней назад

      @@stars7438 I WANT SWORD DEALER LIKE ONE PIECE GAME ( BLOX FRUIT , KING LEGACY ) PRESS BUTTON AND I WILL GET IT

  • @_skribl
    @_skribl 19 дней назад

    A Lerp function with deltatime calculation is better for most cases but otherwise the code is pretty good

  • @costaskalt
    @costaskalt 20 дней назад +2

    really cool video, can you show us how to make mobile only UI for running?

    • @stars7438
      @stars7438  19 дней назад

      Yes I will, thanks for the idea!

    • @stars7438
      @stars7438  19 дней назад +1

      Here is the link for the video you requested! : )
      ruclips.net/video/qN2iAJebYoU/видео.html

    • @costaskalt
      @costaskalt 19 дней назад

      @@stars7438 that was so fast, thank you!

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

    Cool

  • @cyrusdevs
    @cyrusdevs 19 дней назад

    Not the best way to make a player's speed accelerate but great for beginners!

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

    hey would like to be a scripter for my friend kingdom hearts game

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

      I'd love to but I'm currently occupied on a project of my own, so I'd have to reject your offer for now, thanks for the offer, I'm glad you think I'd be a good fit for the team!