Can anyone tell me what I'm doing wrong because i copied exactly what
a youtuber showed on his video and it worked for him
local db = true
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") ~= nil then
if db == true then
db = false
script.Parent.Transparency = 1
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
player.leaderstats.Coins.Value = player.leaderstats.Value +1
script.Sound:Play()
wait (1)
script.Parent:Remove()
end
end
end)
i did the leaderboard correctly and this so im confused
