I have no idea how to make stamina gui work so can someone help me?
local player = game:GetService("Players").LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local camera = game:GetService("Workspace").CurrentCamera
local uis = game:GetService("UserInputService")
local tween = game:GetService("TweenService")
local module = require(game:GetService("ReplicatedStorage"):WaitForChild("Tween"))
uis.InputBegan:connect(function(input,typing)
if typing then return end
if input.KeyCode == Enum.KeyCode.LeftShift then
print("Sprinting")
tween:Create(camera,module.run,{FieldOfView = 80}):Play()
char.Humanoid.WalkSpeed = 35
end
end)
uis.InputEnded:Connect(function(input,typing)
if typing then return end
if input.KeyCode == Enum.KeyCode.LeftShift then
print("Walking")
tween:Create(camera,module.walk,{FieldOfView = 70}):Play()
char.Humanoid.WalkSpeed = 16
end
end)


the white bar is stamina bar i have to make it go middle
