How do I make a coin counter which counts up 1 every time you are in collision with the coin and when you die the counter resets

.dont know what to put in here

Try this

I don’t know how you are detecting the player is dead. But with your method, you can change the scene variable score back to = 0

NOTE: If you’re restarting the scene if the player dies, the scene variable by default will start as 0