Is it possible to use Tick() to change a value?
My goal is to make a meditation system and when you start meditating numbers will slowly start being added to the Number Value.
Is it possible to use Tick() to change a value?
My goal is to make a meditation system and when you start meditating numbers will slowly start being added to the Number Value.
I mean yes because tick does return a number.
It is possible, but it’s not good for a continuosly running system as there are better alternatives.
Tick() is normally used for getting time between discrete events with a longer period like an input began debounce.
For something like what you are mentioning about, it’s best to use a time measuring method that runs every frame like task.wait() or Runservice.Heartbeat as it’s guaranteed to run continuously as possible in order to create a smooth effect.
Though you could still use tick() to measure the time elapsed every frame as well but it’s much neater to use Heartbeat and task.wait() as they directly return the time elapsed.