I want to prevent this script from running more than once, so I figured if I use a debounce, that will fix my problem, but I don't know where...
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
script.Parent.Sound:Play()
local player = game.Players.LocalPlayer
player.leaderstats.Coins.Value = player.leaderstats.Coins.Value + 1
wait()
script.Disabled = true
script.Parent:Destroy()
else
wait(10)
script.Parent:Destroy()
end
end)
