I tried debounce too, but still executes twice. It gets 3, while it should have gotten 2.
if itemToAppear:HasTag("Upgrader") then
childTransparency = 0.5
local upgrader = itemToAppear
upgrader.Touched:Connect(function(toucher)
if toucher:HasTag("Drop") then
upgrader.CanTouch = false
local getCost = toucher:GetAttribute("Cost") + 1
toucher:SetAttribute("Cost", getCost)
toucher.BillboardGui.TextLabel.Text += tostring(getCost)
task.wait(1)
upgrader.CanTouch = true
end
end)