Hiya,
I’m having a slight problem with tweening a NumberValue. When the value is tweened, it gets from value A to value B but during the transition, but it goes through extremely long decimals which make many things buggy, for instance, the leaderstats and my gui:
There are many more things that break due to this, any solution would be appreciated.
Code
The code that updates the actual value in the leaderstats folder:
MoneyStore:OnUpdate(function(NewMoney)
TweenService:Create(MoneyValue, TweenInfo.new(1), {Value = NewMoney}):Play()
end)
Code of the cube for context:
script.Parent.ClickDetector.MouseClick:Connect(function(Player)
local Money = DataStore2("Money", Player)
Money:Increment(15)
end)
Code of the Gui:
Money.Changed:Connect(function(NewValue)
MoneyLable.Text = "$"..tostring(Money.Value)
end)
I need the value to gradually increase/decrease without going through decimal values.