I Can't get the real time static int from another script plz help!
K so im building a brick breaker game and i have a empty collider below so when the ball lands it resets the ball and takes 1 life away, this has worked fine until i tried implementing a health bar in the collider my variable is
static public int Lives = 5;
and on the healthbar i'm trying to have it change everytime you loose a life but for some reason i only get 5, when i
print (LoseCollider.Lives);
I get 5 but it never changes even after i loose a life i know the losecollider is keeping track cause at 0 it brings me to my lose scene im really stuck please help me
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612082940im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Sync Var not syncing on client. 0 Answers
How can I access an int variable from another script? 1 Answer
Help with variables 1 Answer
Sorting by Variables Help 0 Answers