So, when I make a gui pop up, theres a part of the script that detects IF there is a configuration folder called “UpgradedStats”. but when something is maxed, It comes up with an error saying its not in the object. This shouldnt be happening because its checking if its in there.
if not config.UpgradedStats then
gui.Selection.Action.Upgrade.Visible = false
else
gui.Selection.DamageAfterUpgrade.Text = "+"..(config.UpgradedStats.Damage.Value - config.Damage.Value)
gui.Selection.RangeAfterUpgrade.Text = "+"..(config.UpgradedStats.Range.Value - config.Range.Value)
gui.Selection.CooldownAfterUpgrade.Text = "-"..(config.Cooldown.Value - config.UpgradedStats.Cooldown.Value)
end