How do I check if a number rise alot under a short period of time?
✓ ANSWER ACCEPTED
How to check if a number rise alot under a short period of time?
1 answer
✓ Accepted answer
You could check the rate a number is changing per second using a coroutine fairly easily with something like
local numberVal -- The value that's changing
local rate = coroutine.create(
function()
local start = numberVal
wait(1)
local finish = numberVal
print("The number value is changing at " .. tostring(finish - start) .. " unit<s> per second.")
end
)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
guess you could have a function add up the number of changes a number undergoes(upward) and use an if statement to create a message when the number jumps so much. You'd have the variable counter reset every few seconds.(not sure of easier way lol)
How much is "a lot"