local db = true
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") ~= nil then
if db == true then
db = false
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
player.leaderstats.Coins.Value = player.leaderstats.Coins.Value + 1
script.Parent.Parent.Parent.Model:Destroy()
end
end
end)
error: 12:20:25.556 - Touched is not a valid member of Model

1 comment
make sure script.Parent is a part