Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I add a Gui For the stamina?

Asked by 9 years ago

Here's the actual script, I don't' know how to add a Gui for the amount of stamina the player has.

Mouse.KeyUp:connect(function(shiftUp)
   if shiftUp:byte() == 48 then
      sprinting = false
   end
end)

Mouse.KeyDown:connect(function(shiftDown)
   if shiftDown:byte() == 48 then
      player.Character.Humanoid.WalkSpeed = 22
      sprinting = true
      if stamina.Value <=0 then --Less than, in case it goes negative
         sprinting = false
      end
      while sprinting do
         stamina.Value = stamina.Value -1
         wait(.1)
      end
      player.Character.Humanoid.WalkSpeed = 16
   end
end)

1 answer

Log in to vote
0
Answered by
Merely 2122 Moderation Voter Community Moderator
9 years ago

Here's a link to the Beginner's GUI Tutorial on the ROBLOX wiki:

http://wiki.roblox.com/index.php?title=Beginner%27s_GUI_Tutorial

In your case, you will need to create a ScreenGui in StarterGui with a Frame inside, and in your script, change the Size property of the Frame each time the stamina is changed.

0
:( I know how to make a Gui Seeker5123 15 — 9y
Ad

Answer this question