after the stamina value is reduced to 0 and it is refilled it dosent print energized which is the function i want it to repeat. Another problem is that it prints tired when the value is 10 when i want it to print when the value is 0

user.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.Q and tired == true then
    if stamina > 0 then print("energized")
        print(stamina) -- idk whether this is a value or a number
        stamina = stamina -10
if stamina == 0  then 
        tired = true  print("tired")
        elseif stamina > 0 then 
        tired = false  print("energized")


    end
end
   end
end)

1 comment

0

Show the full script since we don't know what stamina is. Also, lines 8 and 9 are pointless so remove them.