I am making a 2 player game where each player has a separate coin count and I don't know how to do it.
Develop games in your browser. Powerful, performant & highly capable.
If 2 players means 2 instances same object, You can create instance variable and add text as container to store and display coin counts.