A scoreboard that never moves is boring. Now you make the number actually change, which means reaching into a player’s leaderstats and updating the Coins value. This is the exact move a tycoon makes every time a dropper pays out, so it’s worth getting smooth.
The path is just dot notation walking down the Explorer tree: player.leaderstats.Coins. From there, .Value is the number you read and write.
local part = script.Parent
local debounce = false
part.Touched:Connect(function(hit)
if debounce then return end
local character = hit.Parent
local player = game.Players:GetPlayerFromCharacter(character)
if player then
debounce = true
player.leaderstats.Coins.Value = player.leaderstats.Coins.Value + 10
wait(1)
debounce = false
end
end)
The one genuinely new tool is GetPlayerFromCharacter. A Touched event hands you a body part, not a player, so this turns “a leg touched me” into “this belongs to Caden.” The if player then check matters because a falling brick has no player, and you don’t want to crash trying to give coins to a brick.
Everything else is review: debounce from events, dot notation from essentials, math from foundations. Run the checklist, touch the part, and watch your coins climb. When the number rises on a touch, mark it done.