How do I stop my character from sprinting until the stamina bar is fully replenished

Oh, and I set Stamina to float. You can cast it to an integer for your UI.