I have the value of the string and the value of the server chain saved in the replicated storage and all can be edited, except this input value is called msg5

In this script, I am trying to add a local value to the server value, but it does not work when that local value is updated during the game, it is only added if the value was already in the local value before starting to play



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


6 comments

0

Local is not a valid member of Players

0

Does your script error?

0

anyway this localscript or normal script

0

I have a folder in players called local, which works very well.

0

my script has no errors, and it's a normal script (it's not local)

0

While wait do is never a good idea. The most efficient way to do this is to watch the value for changes.