Where to start with an upgrade system?

Hey all,

Recently I’ve been working on a small project just as a learning experience, and I’ve been wondering how to start with an upgrade system?


Right now the yellow money icon gives you 1 money when you click it however I wanted to make it so if you upgrade it, it goes up to 2 money per click.

Any ideas where to start? I already have a datastore system in place.

Thanks everyone!

1 Like

create values for the price of the upgrade (example. UpgradePrice) and another value for the current level of the upgrade (example. UpgradeLevel)

  1. button is clicked
  2. fire remoteevent from client to server
  3. server receives event and checks if players money value is higher or equal to the UpgradePrice value TIMES the UpgradeLevel value
if Player.Money.Value >= Player.UpgradePrice.Value * Player.UpgradeLevel.Value then
  1. if true then remove the UpgradePrice value from players money
Player.Money.Value -= Player.UpgradePrice.Value
  1. increase UpgradeLevel value
Player.UpgradeLevel.Value += 1

in your current code that gives the player money also multiply the amount it gives to the player by the UpgradeLevel value

2 Likes

Got it, thanks so much!

(chasadasdrsasdanfjs)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.