I have an upgrade script. The 1st cost is 17. I can buy it for 17 but I can keep buying it for 17, yet the cost value is actually raising and more than 17. How come the script isn't detecting the value change?
upgrade script:
UpgradeBackpack.OnServerInvoke = function(player) local cost = player.UpgradeCosts.BackpackUpgrade if cost.Value <= player.leaderstats["Coins"].Value then player.leaderstats["Coins"].Value = player.leaderstats["Coins"].Value -cost.Value player.backpack.WeightLevel1.Value = player.backpack.WeightLevel1.Value + 1 return true else cost.Changed:Connect(function() if cost.Value <= player.leaderstats["Coins"].Value then player.leaderstats["Coins"].Value = player.leaderstats["Coins"].Value -cost.Value player.backpack.WeightLevel1.Value = player.backpack.WeightLevel1.Value + 1 return true else return false end end) end end