Quick question.

So I saw a video on youtube on how to make a timer slider and it work as intended althoug the video put everything inside Update() and I was wondering, should I put the float time variable inside fix update and multiply it by Time.deltatime instead?

here’s the script:

float time = attackTime - Time.time;

        int minutes = Mathf.FloorToInt(time / 60);
        int second = Mathf.FloorToInt(time - minutes * 60f);

        if (time <= 0)
        {
            stopTimer = true;
        }

        if(stopTimer == false)
        {
            attackSlider.value = time;
        }

FixedUpdate should mainly be used for physics operations, like moving a Rigidbody.

Update is fine.

ok ok I know for physic, it’s caus not everyone have the same framerate. I touhg it would have influenced time also. thanks mate. :slight_smile: