I've been going around the internet how to add to a leaderboard! What I want to do is: when a player touches a coin, add to the "Coins" leaderboard, I've searched around the web, but all answers seem to be different!
I have the scripting for the coins done, and "Coins" is on the leaderboard, but I just don't know how to get it to go up! help!
Is there even a way to do so?
If not, should I just give up?
what I have is:
local cash = Instance.new("IntValue")
cash.Name = "Coins"
cash.Value = 0
cash.Parent = stats
And that works alright, I think.
The coins were not made by me. but, they get destroyed after you touch them.
What I've gathered together from the internet is:
workspace.Coin.CoinBoundingBox.Touched:connect(function(hit)
cash.Value = cash.Value + 1
end)
And that doesn't work.
Any assistance would be greatly appreciated.

6 comments
why in the world are you looking in the Backpack for the leaderstats folder?
leaderstats is normally placed in the backpack
fixed it
leaderstats is normally placed in the player
what is it touching? If the Script's parent happens to be the player's character, that will run the script every time an animation plays or the player steps on something. Even then... WHAT ARE YOU DETECTING THE TOUCHES FROM?!?!?! THE PLAYER'S CHARACTER IS A MODEL!!!
Relatively, the character is a property of the player and IS NOT a child, it is also a model. Also, you're completely wrong.