Detect item from list and do something with it

I am trying to do coin pickup and I am wondering if there is other way with list than doing it manually.

Manual example what I am using:

(at “delete item” is supposed to be Coin1, ignore that please)

We can see 3 coins and I want them to have them in group or list and detect which one is clicked + delete him when clicked.
Does someone know how to do it? Thanks!

How many coins are used?

If it’s 5 or fewer coins, it’s simpler to just create individual variables for each, along with a score variable, making a total of 6 variables.

  1. If you use a list, you can create a list to store the scores…
  2. Furthermore, you can create a function (or list) to store and call objects. There was an example of this in a previous Jenga game example.

Certainly, there are many ways, but… it’s not easy to give an answer just by asking like this.