this is the script:
part = script.Parent part.Touched:connect(function(hit)
player = game:GetService("Players").LocalPlayer
stats = player:findFirstChild("leaderstats")
coins = stats:findFirstChild("Coins") coins.Value = coins.Value + 1
end)
and yes I have a leaderboard script

1 comment
You can only use local player in a local script