G’Day, I’m attempting to smoothly change my numbers for my GUI but I can’t seem to properly understand how to do it. Basically I want my number to slowly increase/decrease depending on a variable.
I’ve tried many things like;
Watching Code Blue’s tutorial, but this just confused me more as it wasn’t working.
Using math.Approach, This one was confusing as I don’t know how to make it decrease
local health = math.Clamp( self:Health(), 0, 100 ) local smoothHealth = math.Approach( 100, health, 1 )
Using Lerp, This seemed to half work, but the number was not a full int
local health = math.Clamp( self:Health(), 0, 100 ) local smoothHealth = Lerp( 2 * FrameTime(), 100, health )