How to Make a *POLISHED* Sprint and Stamina System in Roblox Studio (2023)

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

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

  • @ManlyCreator
    @ManlyCreator  ปีที่แล้ว +12

    If if you enjoyed this video and want to support me then don't forget to try my game with the link in the description! I was trying a different style of video where I explain what I'm doing after doing it, so let me know in the replies what you thought of that and any questions you may have.

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

      This is great!

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

      On mobile the animation doesn’t work, also on pc whenever I use shift while standing the animation plays when I’m not moving. Other than that great video!

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

      Great video, though when I implement the animation feature it doesn't work. And it doesn't show any red errors in the output about it..

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

      @@misteryious his doesn’t work, so I made my own, when making put it on a loop or you’ll have to keep copy and pasting the animations

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

      @@StillALivingThingdownload RealismMod plugin, it has a ton of options including disable shiftlock

  • @elliotingberg3848
    @elliotingberg3848 9 หลายเดือนก่อน +5

    You should definitely keep doing these kinds of tutorials. You explaining what everything is doing actually makes me learn something!

  • @theactualsplit
    @theactualsplit 10 หลายเดือนก่อน +31

    For the ppl that say they hold shift when they stay still and the animation still plays just put this under the print(stamina)
    if humanoid.MoveDirection.Magnitude

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

      THANK YOU SO MUCH BRO YOU SAVED MY GAME

    • @ChiseledMango-rz8eb
      @ChiseledMango-rz8eb 8 หลายเดือนก่อน +2

      Tysm

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

      W man

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

      BRO TYSM

    • @legalmel
      @legalmel 4 หลายเดือนก่อน +1

      this only lets me move if i am sprinting

  • @Granite224
    @Granite224 11 หลายเดือนก่อน +7

    can you make the next vid about how to make a skill tree + skill points system (and levels if u want) (but only if u want to)

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

    10:29 you can fix that by changing the green bars anchor point, rotating ui in roblox causes issues sometimes and it’s unreliable

  • @orestas.2202
    @orestas.2202 16 วันที่ผ่านมา

    for anyone who wants the jump animation to play while sprinting try this
    humanoid.StateChanged:Connect(function(oldState, newState)
    if newState == Enum.HumanoidStateType.Jumping then
    if sprintAnim then
    sprintAnim:Stop()
    end
    end
    end)
    humanoid.StateChanged:Connect(function(oldState, newState)
    if newState == Enum.HumanoidStateType.Landed and isSprinting then
    if sprintAnim then
    sprintAnim:Play()
    end
    end
    end)

  • @IMPERATOR4
    @IMPERATOR4 29 วันที่ผ่านมา

    Yes, man, that was exactly what I was looking for, really needed that cooldown before recharging

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

    Thanks this video is super underrated now i can finally make a horror game

  • @davidfreshh7160
    @davidfreshh7160 7 หลายเดือนก่อน +20

    Don’t rush. Take your time and actually let people write the code, and try your best to explain it in a slow manner. No harm I just want to help you!

  • @pedrohenriquenascimentocam8798
    @pedrohenriquenascimentocam8798 17 วันที่ผ่านมา

    Thanks bro, your video helped me a lot here :)

  • @1245EK
    @1245EK 11 หลายเดือนก่อน +6

    For some reason the attributes wont add to the humanoid :/

    • @singusthetexan
      @singusthetexan 8 หลายเดือนก่อน +1

      same problem

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

      it must be a typo somewhere, I had the same issue. After fixing a typo it worked

    • @orestas.2202
      @orestas.2202 18 วันที่ผ่านมา

      Stop game then play again

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

    one issue, is that with runservice, the speed changes depending on the player fps, since more frames are rendered, I think a simple way to fix it is the have a "while true do wait(1/60) end" loop, might not be the prettiest but it gives a more consistent stamina.

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

      Hey man, I'm new to coding. I've been trying to find out where to change the runservice but every time I edit it. For some reason the stamina doesn't work. Can you tell me where to change it. Thank you

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

      @@trollersupreme4316 there's the function that the run service activates, all the code inside of that, put it inside the while true do wait(1/60) *put the code here* end

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

      ​@@catdealer1144 Thank you for the help!

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

      @@trollersupreme4316 be aware it doesn't actually run at 1/60 intervals because of how the code runs, but it's still more consistent than runservice

  • @ziggykidder8861
    @ziggykidder8861 11 หลายเดือนก่อน +4

    He did not show how to not make it so you dont play the anim while not moving so just add this in the SprintClient right before "Print(Stamina)"
    if humanoid.MoveDirection.Magnitude

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

      goodlooks wouldn't have figured it out

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

      Thank you so much, but now if I hold shift before moving the animation doesn't plays at all,
      It only plays if i'm already moving and then hold shift, any clues on fixing that?

  • @thefroogguy
    @thefroogguy 5 หลายเดือนก่อน +4

    hey i dont know if he didnt show this but my stamina doesnt regen it goes down then doesnt regen then i cant run no more heres my script -- Script --
    local player = game.Players.LocalPlayer
    local character = player.Character or player.CharacterAdded:Wait()
    local humanoid = character:WaitForChild("Humanoid")
    local maxStamina = humanoid:GetAttribute("MaxStamina")
    local screen = script.Parent
    local staminaBar = screen:WaitForChild("StaminaBar")
    local remaining = staminaBar:WaitForChild("Remaining")
    humanoid:GetAttributeChangedSignal("Stamina"):Connect(function()
    local stamina = humanoid:GetAttribute("Stamina")
    remaining.Size = UDim2.new(1, 0, 1 - (1- (stamina / maxStamina)))
    end)

  • @Phract_all
    @Phract_all 6 หลายเดือนก่อน +1

    this is kind of late but for some reason it doesn’t apply the attributes. i have everything copied word for word yet it still doesn’t let me sprint use stamina etc

  • @Johnink03
    @Johnink03 ปีที่แล้ว +3

    the legend is back

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

      Haha thanks man, I hope you enjoy!

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

    just fyi at 12:32 the 1 - (1 - Stamina/MaxStamina) is redundant, all you need is Stamina/MaxStamina (because we want the percentage out of 1, which that already is! :) thanks so much for the tutorial

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

      This worked for me kind of, however it makes it so the stamina bar disappears instantly and the background is just left.
      Any help?

  • @foxyinvr5209
    @foxyinvr5209 3 หลายเดือนก่อน +2

    I finished everything and the sprint works and stamina but when I start sprinting stand still while still holding shift and run again it doesn't play the animation

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

      Copy and paste this into the sprint Client in starter character scripts:
      "-- Services --
      local CAS = game:GetService("ContextActionService")
      local RNS = game:GetService("RunService")
      -- Settings --
      local StaminaUsage = 0.5 -- How much stamina to use while running
      local RechargeTime = 1 -- How long until stamina starts recharging
      -- Script --
      local character = script.Parent
      local humanoid = character:WaitForChild("Humanoid")
      -- Animation --
      local Sprint = script.Sprint
      local SprintAnim = humanoid.Animator:LoadAnimation(Sprint)
      local LastSprint = math.huge
      local IsSprinting = false
      local function sprint(actionName, inputState, inputType)
      if inputState == Enum.UserInputState.Begin then
      IsSprinting = true
      elseif inputState == Enum.UserInputState.End then
      IsSprinting = false
      end

      if humanoid.WalkSpeed 0 and humanoid.MoveDirection.Magnitude > 0 and humanoid.WalkSpeed > 0 then
      humanoid:SetAttribute("Stamina", stamina - StaminaUsage)
      LastSprint = tick()
      else
      if tick() - LastSprint >= RechargeTime and stamina < humanoid:GetAttribute("MaxStamina") then
      humanoid:SetAttribute("Stamina", stamina + StaminaUsage)
      end
      end
      print(humanoid:GetAttribute("Stamina"))
      if humanoid.MoveDirection.Magnitude

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

    Bro this is an insane tutorial! Thank you so much for the help! You are a freaking legend! Definitely underated! I spent 2 hours tryna figure this out and i came across this vid! LIFESAVER!!

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

    7:19 I got to this point where everything stopped working. I've gone through all of my code multiple times and I haven't found where the problem is coming from, but I'm completely unable to sprint.
    My current script:
    -- Services --
    local CAS = game:GetService("ContextActionService")
    local RNS = game:GetServivce("deltaTime")
    -- Settings --
    local staminaUsage = 0.5
    local rechargeTime = 1
    -- Script --
    local character = script.Parent
    local humanoid = character:WaitForChild("Humanoid")
    local lastSprint = math.huge
    local isSprinting = false
    local function sprint(actionName, inputState, inputType)
    if inputState == Enum.UserInputState.Begin then
    isSprinting = true
    elseif inputState == Enum.UserInputState.End then
    isSprinting = false
    end

    if isSprinting then
    humanoid.WalkSpeed = humanoid:GetAttribute("SprintSpeed")
    else
    humanoid.WalkSpeed = humanoid:GetAttribute("BaseWalkSpeed")
    end
    end
    CAS:BindAction("Sprint", sprint, true, Enum.KeyCode.LeftShift)
    RNS.RenderStepped:Connect(function(delta)
    local stamina = humanoid:GetAttribute("Stamina")
    if isSprinting then
    humanoid:SetAttribute("Stamina", stamina - staminaUsage)
    lastSprint = tick()
    else
    if tick() - lastSprint >= rechargeTime and stamina < humanoid:GetAttribute("MaxStamina") then
    humanoid:SetAttribute("Stamina", stamina + staminaUsage)
    end
    end
    print(stamina)
    end)

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

      This has also happened to me and nothing is wrong with my code

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

      why did you put deltatime, which is not even a service, in the place of runservice?

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

    This man is the most underrated person in the whole world

  • @toxomin9042
    @toxomin9042 ปีที่แล้ว +4

    what happens to the stamina draining when you have different fps? do you drain more or less stamina depending on your fps

    • @ManlyCreator
      @ManlyCreator  ปีที่แล้ว +4

      That's a really good question and I'm glad you brought that up. Players with a lower framerate would have a higher advantage since they would have less stamina subtracted each second. To fix this, use the equation (staminaUsage * 60 * delta) in place of just subtracting or adding staminaUsage. 60 assumes a base rate of 60 fps and delta is the time between each frame. Let's say a player's fps is 30, then the delta is going to be 0.03 (twice the delta of someone with 60 fps), therefore doubling the stamina used to balance out their usage with other players. Hope that makes sense.

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

      That really feels like an ai generated response lol@@ManlyCreator

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

      use deltaTime instead of fps

  • @Weah_123
    @Weah_123 4 หลายเดือนก่อน +1

    idk why but there are no attrubutes on me

  • @ex-TKM
    @ex-TKM 11 หลายเดือนก่อน +5

    is there a way to when you sprint the FOV changes?

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

      for i = 1,5 do
      game.Workspace.CurrentCamera.FieldOfView = (110+(i*2))
      task.wait()
      humanoid.WalkSpeed = humanoid:GetAttribute("SprintSpeed")
      end
      wait()
      else
      sprintAnim:Stop()
      humanoid.WalkSpeed = humanoid:GetAttribute("BaseWalkSpeed")
      for i = 1,5 do
      game.Workspace.CurrentCamera.FieldOfView = (110-(i*1.5))
      wait(0.00001)
      put this in there the wait at the end with 0.00001 is not vital but it putted there for funsies and the task.wait() is so that the player cant spam shift and get inf stamina and the fov is dictated by the place where 110 is at make sure they are both even because if so it won't decrease or increase after you unhold shift

  • @VeryProPlayerYesSir1122
    @VeryProPlayerYesSir1122 ปีที่แล้ว +3

    18th like from me. Keep making good content sir.

  • @1daydreamt
    @1daydreamt 6 หลายเดือนก่อน +1

    So ive run into the problem that after the stamina id implemented the sprint speed is immediately cut, the stamina still works but sprint speed dies for spme reason

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

    This is actually good replication techniques and a good tutorial compared to alot in the community nice work!

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

    bro you just gained another subscriber!. Keep the good work up!

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

    can you make the same thing but you also loose stamina when you jump?

  • @UsernameaBad
    @UsernameaBad 8 หลายเดือนก่อน +1

    How to make the stamina bar horizontal without it bugging out

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

    bro this helped me so much beascuase my code was right. but I didn't known you had to set the scale first.

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

    Can you add a dashing system with this aswell?

  • @Zergiu-Boo
    @Zergiu-Boo ปีที่แล้ว +1

    when i freeze while i run the runninganim is still going, how do i fix that?

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

    Best tutorial ever! Thank you so much.

  • @GalaxyNinjaX
    @GalaxyNinjaX 11 หลายเดือนก่อน +2

    I've copied everything exactly, but it won't work. why?

  • @bad_code0191
    @bad_code0191 7 หลายเดือนก่อน +1

    what if I want stamina to decrease when I jump
    can anyone suggest me

  • @IMPERATOR4
    @IMPERATOR4 29 วันที่ผ่านมา

    Well, yeah, but we have a problem about frames now, so now - higher frames - higher stamina usage and higher recover speed, any ways to fix that?

  • @Firestarbright
    @Firestarbright 8 หลายเดือนก่อน +3

    When I press Shift it just makes me COMPLETLY stop and I cant walk anymore. I can only jump

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

      did you solve this problem?

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

      @@QQulekks yes i did end up solving the problem bu adding another script

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

      By*

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

      Good then i had the same problem but i needed to check if letters are big or no and instead of putting "." i have put ","

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

      @@Firestarbright what is the script you added to fix it? I'm having this same issue.

  • @pickle8ed
    @pickle8ed 11 วันที่ผ่านมา

    if it subtracts stamina by 0.5 every frame, wouldnt that mean that someone on 30 fps would be able to sprint for longer than someone on 120? I may be stupid but i just want to make sure... kinda new to all of this stuff.

    • @ThidDrutsburg
      @ThidDrutsburg วันที่ผ่านมา

      Yes, that's why you should use a while task.wait(0.1) do loop than RenderService.

  • @Briggs-e5k
    @Briggs-e5k 8 หลายเดือนก่อน

    trying to learn lua, great video explains everything and i can just copy what i dont get
    totally subbing

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

    the animation loads when u hold shift and standing still

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

    could you do a video on working on stuff 2d related like a 2 camera that works smoothly

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

      That's a good idea. Just like a 2D platformer, right?

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

      @@ManlyCreator yea since thats the type of game im maing

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

      @@thatonechannel990 It might be a while before I make a video like that, but if you need it soon I'd recommend checking out my top-down camera video. All you need to do is change the camera angle and it would work the exact same 👍

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

    I have a question for the setting up script part i followed it thoroughly and for some reason the speed didn't change is there something i can do?

  • @MrGofyeYT
    @MrGofyeYT 11 วันที่ผ่านมา

    is there a way to make the stamina toggle?

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

    I’ve been trying to find a video where they show how to add walking and running animations separately, this video helped me

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

    the stamina bar isnt going down when i sprint how do i fix this

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

    can anyone tell me where to get a character model and which one?

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

    how do i make other actions take stamina as well? dashing or rolling for example

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

    hey your videos are really helpful. I have confronted a problem; when I run out of stamina completely it pauses for about 5 seconds before I start to regenerate stamina. Is there a solution for this problem?

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

    for some reason it wont work for me when i test at 4:13

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

      Same

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

      You must type humanoid.WalkSpeed with a uppercase S
      local function sprint(actionName, inputState, inputType)
      if inputState == Enum.UserInputState.Begin then
      humanoid.WalkSpeed = humanoid:GetAttribute("SprintSpeed")
      elseif inputState == Enum.UserInputState.End then
      humanoid.WalkSpeed = humanoid:GetAttribute("BaseWalkSpeed")
      end
      end
      This was my problem, idk about yours.

    • @XxNovacaine
      @XxNovacaine 8 วันที่ผ่านมา

      ​@@jiggity2538Thanks❤

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

    for the character config, is it possible to add additional attributes for more options like, mana points, vitality points, for additional game mechanics?

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

      Absolutely! Attributes are a very flexible way of controlling any kind of system you want to make.

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

    I was wondering if it was possible to add wait(5) somewhere before it actually starts to recharge. Or make it so that once stamina reaches 50 or halway on the bar, it allows you to run again.

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

      maybe u could add a timer before the stamina regen event starts

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

      yeah i did that for 2 seconds till recharge but i made it so you could still sprint even if 1 second had passed but it wouldn't regen ur stamina

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

    Hey, any help here I can't move when I hit Leftshift is my code right? -- Services --
    local CAS = game:GetService("ContextActionService")
    -- Script --
    local character = script.Parent
    local humanoid = character:WaitForChild("Humanoid")
    local function sprint(actionName, inputState, inputType)
    if inputState == Enum.UserInputState.Begin then
    humanoid.WalkSpeed = humanoid:GetAttribute("SprintSpeed")
    elseif inputState == Enum.UserInputState.End then
    humanoid.WalkSpeed = humanoid:GetAttribute("BaseWalkSpeed")
    end
    end
    CAS:BindAction('Sprint', sprint, true, Enum.KeyCode.LeftShift)

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

      In this case you need to see if you did the other steps right

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

    bro iu stoped after 4 mins where u said test when i pressed shift i couldnt move at all i checked and everything was exactly the same i tried with r6 and r 15 none worked

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

    nice video helped a lot

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

    Maybe it's just me, but the GUI isn't working for me. I've followed the steps about three times now yet the stamina remains fully coloured in.

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

    How did you get animations of the marketplace? What?!

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

    Hey, im new to roblox studio, and this video is teaching me a lot, but for some reason, the game isnt applying the attributes to my character when I try testing it? I copied what you write letter for letter, but still nothing. Either way, again, thanks for the video!

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

      Nevermind, I was checking the wrong file, it works for now!

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

    sup dude its zeke w vidoe

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

      should do a video doing a menu system like when a player presses M or a keybind a gui with like differant stuff it in

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

      Yooo, thanks dude. A menu system is a good idea, I'll add that to my to-do list.

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

    How would i code the ui if I made it horizintal

    • @testdoang6161
      @testdoang6161 11 หลายเดือนก่อน +3

      humanoid:GetAttributeChangedSignal("stamina"):Connect(function()
      local stamina = humanoid:GetAttribute("stamina")
      remaining.Size = UDim2.new( (stamina / maxStamina), 0, 1, 0 )
      end)

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

      thanks!@@testdoang6161

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

      thx dawg ❤ @@testdoang6161

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

      @@testdoang6161 Thx so much

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

    why didnt it add the attributes? (i checked and everything was the same)

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

      did you add the comas after the numbers in the module script?

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

      1:57

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

      @@itsbonksy i did but it still wouldnt work, any other solution?

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

      @@singusthetexan an issue i had is i made a typo in the name of the script, maybe check if you spelt it correctly

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

    why is my map uncolided i was falling forever

  • @tarambukis-c2q
    @tarambukis-c2q 3 หลายเดือนก่อน

    screen gooey is wild

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

    I did everything exactly how it says, but im getting and error that says "Begin is not a valid member of Enum.UserInputType" at line 9

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

      oh its enum.userinputstate.begin not userinputtype

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

      @@abreaddeveloper thanks so much I did this mestake too

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

      can someone send me their script i cant get mine to work

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

    The player still sprints even when the leftShift button is released. It only stops when the stamina runs out. Same for the animation. Is there a way to fix this?
    The player won't play the animation too. Please help.
    Thank you.

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

      you need input ended function,
      try this: UserInputService.InputEnded:connect(function(input)
      if input.keycode == enum.keycode.(your key)
      then character.Humanoid.WalkSpeed = "your base walkspeed"
      sprintanim(youranimation):stop()

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

    ily

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

    no model?

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

    Can you make a version where the stamina bar only appears when your sprinting?

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

      I'm not sure, but I think you can change the visibility or transparency of the gui or frames when the player is sprinting. I haven't tested this out, but you can try!

    • @agentbasil618
      @agentbasil618 27 วันที่ผ่านมา

      (i know im necroposting but) you can change the visibility to be true on the background frame whenever you're holding leftshift

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

    whenever i set the rechargeTime below 0.5 the stamina does not regen anymore, and i want to make the stamina regen slower, any help?

    • @orestas.2202
      @orestas.2202 17 วันที่ผ่านมา

      You need to increase the recharge time to make it slower

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

    Help when I was testing when I pressed shift my player stoped all I could do is jump and when I released shift it still wouldn’t move

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

      Would you mind showing me your script?

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

      problem started at 4:05 i am having the same problem and this is my script :
      character config:
      local module = {
      BaseWalkSpeed = 16,
      SprintSpeed = 32,
      Stamina = 100,
      MaxStamina = 100
      }
      return module
      player data:
      --Services--
      local RS = game.GetService("ReplicatedStorage")
      -- Settings--
      local characterConfig = require(RS.Configuration.CharacterConfig)
      --Script--
      game.Players.PlayerAdded:Connect(function(player)
      player.CharacterAdded:Connect(function(character)
      for stat, value in characterConfig do
      character.Humanoid:SetAttribute(stat, value)
      end
      end)
      end)
      SprintClient:
      --Services --
      local CAS = game:GetService("ContextActionService")
      --script--
      local character = script.Parent
      local humanoid = character:WaitForChild("Humanoid")
      local function sprint(actionName, inputState, inputType)
      if inputState == Enum.UserInputState.Begin then
      humanoid.WalkSpeed = humanoid:GetAttribute("SprintSpeed")
      elseif inputState == Enum.UserInputState.End then
      humanoid.WalkSpeed = humanoid:GetAttribute("BaseWalkSpeed")
      end
      end
      CAS:BindAction("Sprint", sprint, true, Enum.KeyCode.LeftShift )

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

      if humanoid.MoveDirection.Magnitude

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

    When im sprinting with the animation when I jump the jump animation doesnt play

    • @orestas.2202
      @orestas.2202 16 วันที่ผ่านมา

      try this
      humanoid.StateChanged:Connect(function(oldState, newState)
      if newState == Enum.HumanoidStateType.Jumping then
      if sprintAnim then
      sprintAnim:Stop()
      end
      end
      end)
      humanoid.StateChanged:Connect(function(oldState, newState)
      if newState == Enum.HumanoidStateType.Landed and isSprinting then
      if sprintAnim then
      sprintAnim:Play()
      end
      end
      end)

    • @ceilingfan9659
      @ceilingfan9659 16 วันที่ผ่านมา

      @ Dang I forgot I made this comment. It’s fine I figured it out. Appreciate you trying to help

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

    Pra mim a stamina não desce

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

    How do I make the make the user stop sprinting when he has stopped moving but still holding shift?

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

      For this you would have to do constant checks with the RunService. If you join my Discord and contact me I can give you better assistance.

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

      if humanoid.MoveDirection.Magnitude

    • @akeinSleeperbuild1278
      @akeinSleeperbuild1278 8 หลายเดือนก่อน +1

      ​@@ziggykidder8861 Thank god ur a life saver

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

    i cannot get the UI script to work after many attempts, no errors but, when accurately completing the UI as well as the script it just, doesn't work. any suggestions?

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

      the same thing is happpening to me

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

      @@akwasiasanteampong5103 just chat gpt it, you'll actually get a thorough breakdown of the process, you'll usually have to debug somewhat but it beats having to watch these youtubers who pose as beginner friendly but will then leave stuff out and offer 0 explanation. took me like 20 mins to do this exact thing in chat gpt and i actually learned the functions and the script making it easier for next time.

  • @8bitblox2
    @8bitblox2 ปีที่แล้ว

    I cant move at all i can jump but thats it

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

    why does it say walkspeed is not a valid member of humanoid? please help

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

      it may be because u typed it wrong, in script its not walkspeed its WalkSpeed(with capitals) and its not humanoid its Humanoid

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

    someone please make a copy and paste script im too lazy to do it myself
    - just a lazy guy

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

      it didn't take too long to write and it works very well, you should just write it yourself. It's worth it

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

    can’t find my own character

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

    can you make a more simpler video for my small brain to comprehend

  • @Vixity_y
    @Vixity_y 20 วันที่ผ่านมา +1

    DOES NOT WORK | DECMBER 25TH 2024

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

    i cant see it ( am i blind??)

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

    my stamina isnt draining

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

      nvm, I put :GetAttribute not :SetAttribute

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

    YOUR studio 🤔🤔🤔

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

    Didnt work

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

    W

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

    i dont know why but when i press shift when i idle the animation play, how can i fix this?

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

    bro if i hold shift when i say animation is playing how fix it?

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

    how would i get the ui to fade off screen if im not sprinting

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

      i was trying to do that but i couldn't come up with a way to

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

      Im pretty sure you would have to detect when the stamina is equal to or above 100, then make set the gui as invisible, for fading u'll have to use some other variables, i could tell u if u want