So, I've made my own coin, that when you touch it, it plays a sound and disappears. Now, I'm trying to also make it, that when I touch it, I get one point in the leader board. Here's my coin script so far. It's in a part.
local part = script.Parent
local db = false
function coin(hit)
local human = hit.Parent:FindFirstChild("Humanoid")
if not db then
if human then
db = true
game.Workspace.Sound:Play()
script.Parent:Destroy()
wait(1.2)
game.Workspace.Sound:Stop()
human.leaderstats.coin.Value = human.leaderstats.coin.Value + 1
db = false
end
end
end
part.Touched:connect(coin)
while wait() do
part.CFrame = part.CFrame * CFrame.Angles(0,0,0.1)
end
So, my coin spins the way it should, it plays the sound and destroys itself the way it should, it just doesn't give my stats an extra point. Any ideas? I hope this isn't a complicated answer. If it is, please explain it to me.

2 comments
So the leaderstats are in the humanoid?
Leaderstats can't be in the humanoid, that question shouldn't even be a question :P