I added a stamina bar that works off of the SHIFT key. The problem is that if you arent moving and press the Shift key the stamina keeps draining. I looked around and think I found a solution but cant find these 2 GETs. (In the yellow)
i jsut made a function called Check for Moment: https://i.imgur.com/6DHfdwj.png
then i just did this for the stamina: https://i.imgur.com/Q7quHrg.png
i also to fix a issue on if i hold down shift befor moving it wouldnt use stamina
but im not sure on what i did to fix it as it was driving me nuts tryign to figure out how to stop it and i endded up doing a heap of things but most of them use a break and the check for movment function and the isSprinting variable, hope that helps