im going to have 100+ upgrades so i need it more simple but im not sure how to use ** for i = 1,3**
maybe something like this
upgrade = upgrade:GetChildren()
for i = 1,#upgrade do
end
local gui = script.Parent
local core = gui.Core
local upgrade = gui.Upgrades
local background = gui.Background
core.upgrade.Changed:connect(function()
if core.upgrade.Value == 1 then
core.cost.Value = upgrade.upgrade1.Cost.Value
core.clickdmg.Value = core.clickdmg.Value + upgrade.upgrade2.DMG.Value
elseif core.upgrade.Value == 2 then
core.cost.Value = upgrade.upgrade2.Cost.Value
core.clickdmg.Value = core.clickdmg.Value + upgrade.upgrade2.DMG.Value
elseif core.upgrade.Value == 3 then
core.cost.Value = upgrade.upgrade3.Cost.Value
core.clickdmg.Value = core.clickdmg.Value + upgrade.upgrade3.DMG.Value
elseif core.upgrade.Value == 4 then
core.cost.Value = upgrade.upgrade4.Cost.Value
core.clickdmg.Value = core.clickdmg.Value + upgrade.upgrade4.DMG.Value
elseif core.upgrade.Value == 5 then
core.cost.Value = upgrade.upgrade5.Cost.Value
core.clickdmg.Value = core.clickdmg.Value + upgrade.upgrade5.DMG.Value
end
end)

4 comments
thank you !! where could i learn this ?
hmm learn this...... I kind of picked up on this stuff by looking at other people's scripts, asking questions, and most importantly putting new learned info into the scripts I make or have made.
ah, thats kind of what i do haha
And here I thought I was the only one that taught myself with free models...