How to make a collect coin quest

  1. What do you want to achieve? Keep it simple and clear!
    I am creating a quest system for my game, with tasks like earn 100 coins.
  2. What is the issue? Include screenshots / videos if possible!
    I don’t know how to let the script know when the player earned the amount of coins.
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I tried looking on the forum but I couldn’t find the problem I have.
1 Like

Here are some youtube tutorials that might help:


What if the player already has coins, but needs to earn 100 coins on top of the coins they already have?

You could just do Player.Coins.Value += Reward

1 Like

Player.leaderstats.Coins.Value = Player.leaderstats.Coins.Value + (Amount)

1 Like

Just a quick tip for efficiency, the code you wrote is correct however the same can be achieved another way:

Player.leaderstats.Coins.Value += (Amount)

Less typing plus looks better on scripts, very handy!

1 Like