How can I find out how much a value has changed? Here is my script:
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Parent = player
leaderstats.Name = "leaderstats"
local points = Instance.new("IntValue")
points.Parent = leaderstats
points.Name = "Points"
oldValue = player.leaderstats.Points.Value
player.leaderstats.Points.Changed:Connect(function(newValue)
local pointsChanged = newValue - oldValue
print(pointsChanged)
end)
end)
This onlly gives me the value.... Not how much it has changed from the old value...

3 comments
Should I use this to prevent people from change their points? Besides having FE.
FE is all you would need to prevent players from changing their points.
Ok thanks