Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why this doesn't work?

I still wonder why this doesn't work:

p=Instance.new("NumberValue",workspace) 
p.Value=1
 e=p.Value 
e=e+1 
print(e,p.Value)
-->2, 1

1 answer

✓ Accepted answer

You are assigning a new variable a value equal to p.Value, and not assigning the Value a tag. Remove the .Value and add it to your tags when applicable.

tag = script.Parent.NumberValue

tag.Value = tag.Value + 1

This discussion is preserved as it was. New answers, comments, and votes are closed.