Coin collection/Scoring

I’ve made a script in c# to spawn coins in a random order for the player to collect. I’m having trouble figuring out how to make the coins collectible by my player while keeping score. Can someone point me in the right direction?

Check out the Forums

Generally people won’t provide entire scripts in the answers section.

Use collision detection on the Coins, so that when a player bumps into them you can safely handle updating the score and if you wish destroying the coin.

Search the Unity Scripting Reference for OnCollision functions that will help you achieve this type of functionality. There are plenty of Youtube tutorials that outline this basic system as well.

Good luck.