I am using script to change the value by time and use it in other script. But It doesn't result as I expected. Here an example:
cube1
health = game.Players.LocalPlayer.Character.Humanoid.Health -----> 100
a = script.Parent
b = a.NumberValue.Value
while true do
b = health
print (b) -----> 0
end
cube2
health = game.Workspace.cube1.NumberValue.Value
print (health) ---> 0
oof

4 comments
What you're doing is indirectly changing the value, which is why the variable's value changes but the actual value does not. Assign the variable to the value instance, then do b.Value instead of b.
Yeah, that's because when you're storing a property in a variable, you're not storing the property itself, you're storing the value that this property is set to. So what you're doing is wrong, you are pretty much setting a value(the value that the "Value" property was set to), to a value
So I should keep b = a.... and use b.Value instead of b?
Yes.