xMagmaDev
(Terrainny)
January 11, 2021, 5:57am
#1
How would I get the amount an int or NumberValue has changed?
For example, I give myself 5 points. It would print “5”. But if I give myself 10 points it would print “10”.
Trust me, I would do research on this prior to posting this, I just don’t what it is called, if that makes any sense. Thanks for your help.
1 Like
Look into GetPropertyChangedSignal or Changed Event.
After you have used either event, you can simply print the NumberValue’s Value.
1 Like
Not to be mean here, but somebody posted a question like yours, search before posting.
I am very new to scripting, and I am messing around in studio trying to teach myself the ropes. What I am currently trying to do is add a number to a table every time it changes.
More specifically, I have a value in the workspace, and I want to add its value to a table each time it changes, but I have no idea how to go about doing this. Any help is appreciated.
1 Like
xMagmaDev
(Terrainny)
January 11, 2021, 6:12am
#4
I wasn’t looking for this. I am sorry if I wasn’t specific enough in my post. I meant that if a player’s value has changed then I want it to print the value that it has changed by.
1 Like
FerbZides
(FerbZides)
January 11, 2021, 6:15am
#5
you could keep record of the value with 2 Values the 1st one changes its value the second keeps the old one if the second one updates then change the first one to the 2nd’s last value
1 Like
Ohh, well you can use the Changed Event, like @Xx_FROSTBITExX has said.
Example:
IntValue.Changed:Connect(function(newvalue)
print(newvalue)
end
Forgot to mention, but there are changed values for both numbervalues and intvalues,
IntValue.Changed , NumberValue.Changed
1 Like