Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

the script does not update the value of a local intvalue?

Asked by
ksony 54
5 years ago

while true do local stats = game.ReplicatedStorage:findFirstChild("hide2") local msg5 = stats:findFirstChild("msg5") local stats2 = game.Players:findFirstChild("Local") local Vote = stats2:findFirstChild("ActualVote") wait(1) msg5.Value = msg5.Value+Vote.Value end

Help, the following script does not work. Simply update, if I set the vote value before starting the game, but if I change it during the game nothing happens, it is as if nothing had changed, but the vote value if it changes because I verify During the game, the one that does not change is the value of msg5.

My script is normal, (it is not local), it is located in serverscriptservice, I do not have any errors, and msg5 is inside a folder called hide2, which in turn is inside replicatedstorage. And Vote is inside a local called folder that believes in players, which works normally

0
Explain 'folder that believes in players'? xPolarium 1388 — 5y
0
I create a folder in game.Players where I save local intvalues and stringvalues ksony 54 — 5y
0
Don't store that in the Players service. Use ServerStorage instead. Also ':findFirstChild()' is deprecated. Use ':FindFirstChild()' instead. All those variables you define should be outside of the while loop too. xPolarium 1388 — 5y

Answer this question