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
CZXPEK
(czo)
2
create values for the price of the upgrade (example. UpgradePrice) and another value for the current level of the upgrade (example. UpgradeLevel)
- button is clicked
- fire remoteevent from client to server
- 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
- if true then remove the UpgradePrice value from players money
Player.Money.Value -= Player.UpgradePrice.Value
- 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
system
(system)
Closed
4
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.