#Trying to update a value for the textlabel to match the current value of the variable

1 messages · Page 1 of 1 (latest)

royal lichen
#

okay, so everything for the sprint and stamina system works but something i don't know completely how to do is to update the StaminaTextValue to match the currentStamina value so that the Stamina UI element shows the value of the currentStamina variable

image 1: the entire code i currently have
image 2: just showing what ive done for the stamina UI element
image 3: ingame screenshot of the stamina UI element (it doesnt change to show the amount of stamina the player has yet)

if anyone can provide a simple fix it would be greatly appreciated, i mainly say a simple fix because i dont think i have to do any major rewriting, im almost there, i just dont know the last step for it to update

frosty warren
#

so why is the stamina stored in workshpace

#

is this a singleplayer game?

#

cause you could just use a _G, even then i feel like any sort of client-side variable of any sort is better

royal lichen
#

its a multiplayer game

royal lichen
#

also if i shouldnt have stamina stored in workspace, should it be stored in MainGui or StaminaNumber?

cyan bronzeBOT
#

studio** You are now Level 4! **studio

frosty warren
#

personally id just store the stamina as an attribute of the character model

royal lichen
#

the value or variable?

#

the running script is apart of starter player scripts

#

(it wont work on starter character scripts btw)