#math issues

2 messages · Page 1 of 1 (latest)

pine blade
#

I'm trying to get the other stats to add onto points with the correct value i even added and multiplied the stats myself and i still don't understand the issue. I'm not getting the correct value i should be getting. For exampe the second button changes point muti by 2 so looking at the code it should be changing by 2 on the second button, but it doesn't. Can someone help me with this?

#
local Functions = {}
local UpgradeManager = require(game.ServerScriptService.Upgrades)

Functions.Stats = function()
    if UpgradeManager.PointsMulti == 0 then
        UpgradeManager.Points += UpgradeManager.BasePointsGain + UpgradeManager.RootBasePointGain * UpgradeManager.RootPointMulti
    else
        UpgradeManager.Points += UpgradeManager.BasePointsGain + UpgradeManager.RootBasePointGain * UpgradeManager.PointsMulti * UpgradeManager.RootPointMulti
    end
end

return Functions