IntValue.Value + 1

It’ll only grab the value once and set it into a variable, remove the .Value at the end of the variable and place it in the loop (value.Value)

Edit: Noticed that the name of the IntValue is ‘Value’, keep it in the variable but add .Value in the loop

i know what your saying, but hes not getting the Value instance, hes getting ‘‘Value(“this is the instance”).Value(“this is the value of that instance”)’’

Yes. That’s because if you just get the value from the variable, it would store 0. so when it gets updated, it won’t update. thats why i referenced it in the changed function (value.Value ← gets the current actual intvalue value)

1 Like

ohh i understand,.it only stores what the value is at that exact time, and wont update. mb @tannnxr

1 Like

I would like to see how you have the UI set up with the value. It’s the only way I can actually see what’s happening because your script contradicts itself.

1 Like

I tried using the code and it just displayed the placeholder number.

ok, so @YouTube_HQplus , you need to do

and if it says something like value is not a valid member of value then take away the .Value at the end of the variable.

Could you share us your place file? There might be other things in your… quiz system that might be bugged

isn’t using a while loop super inefficient for updating the score

1 Like

Can you print out the value of value.Value in the loop and see what it says, something might be up

2 Likes

ye isnt heartbeat Better or smthn?

(Not trying to be rude but)

I think it would be better if you put the script in Results, so you can easily reference Points better instead of using script.Parent.Parent

Is that script updating the TextLabel? If you’re updating the value with a LocalScript then obviously it won’t show up on the server.

Replace the Script with a LocalScript

2 Likes

For his case, I feel like using value.Changed would be better (only runs on value changed)

1 Like

.Changed event with the value is the most efficient way to update a scoreboard as it only does something when the value has changed

1 Like

image
What it’s outputtting:

That’s the server, you’re doing changes locally so the server can’t see them, use a localscript instead

2 Likes

yes, use a server script, or print on rhe local script, preferably change the script type tho

oh my lord, i’m such an idiot. Sorry guys! I didn’t realise I used a server script instead of local.

3 Likes