pasje1312
(pasje1312)
#1
So I’m trying to find the price value not the string and the exponend value in my module.
normaly I would do this:
local basePrice = upgradeModule.Upgrades[upgradeName]
but how would I do it with this script?
local upgrades = {}
upgrades.Upgrades = {
["MoneyMultiplierUpgrade"] = {["Price"] = 0.5,["Exponent"] = 1.3},
}
return upgrades
What you are doing rn should work, as it should return a table that contains the Price and Exponent.
I dont know if I’m reading this wrong or what, but what you are doing should work
pasje1312
(pasje1312)
#3
But how would I get the price seperatly from that table?
local basePrice = upgradeModule.Upgrades[upgradeName]
local Price = basePrice.Price
local Exponent = basePrice.Exponent
awry_y
(ciphered)
#5
Like so:
local basePrice = upgradeModule.Upgrades[upgradeName].Price