Debounce not working

I added a debounce for my script to give a leaderstat a value and here is what it looks like. I have the wait loop there however it doesn’t seem to be running.

game.Players.PlayerAdded:Connect(function(player)
	local leaderstats = Instance.new("Folder", player)
	leaderstats.Name = "leaderstats"
	leaderstats.Parent = player
	
	local Cash = Instance.new("IntValue", leaderstats)
	Cash.Name = "Cash"
	Cash.Value = 0
	Cash.Parent = leaderstats
	
	local Players = game:GetService("Players")
	local CashGiver = game.Workspace.Teleport1
	
	local debounce = false
	
	-- Giving the player cash after touching teleporter
	CashGiver.Touched:Connect(function(hit)
		if hit and hit.Parent:FindFirstChild("Humanoid") then
			local Client = Players:GetPlayerFromCharacter(hit.Parent)
			
			
			if Client then
				-- Waits three seconds before reseting
				if not debounce then
				
					local debounce = true 
					
					Cash.Value = Cash.Value + 20
					print("Player was given twenty cash")
						
					wait(3)
					local debounce = false
					
				end
			end
		end
	end)
end)

This may not work but take out the local on the last 2 debounce = true or false. So this is what the code should look like:

game.Players.PlayerAdded:Connect(function(player)
	local leaderstats = Instance.new("Folder", player)
	leaderstats.Name = "leaderstats"
	leaderstats.Parent = player
	
	local Cash = Instance.new("IntValue", leaderstats)
	Cash.Name = "Cash"
	Cash.Value = 0
	Cash.Parent = leaderstats
	
	local Players = game:GetService("Players")
	local CashGiver = game.Workspace.Teleport1
	
	local debounce = false
	
	-- Giving the player cash after touching teleporter
	CashGiver.Touched:Connect(function(hit)
		if hit and hit.Parent:FindFirstChild("Humanoid") then
			local Client = Players:GetPlayerFromCharacter(hit.Parent)
			
			
			if Client then
				-- Waits three seconds before reseting
				if not debounce then
				
				 debounce = true 
					
					Cash.Value = Cash.Value + 20
					print("Player was given twenty cash")
						
					wait(3)
				  debounce = false
					
				end
			end
		end
	end)
end)