-- Initially connect all coins to touch detection

for _, coin in pairs(CollectionService:GetTagged("Coin")) do
	coin.Collider.Touched:Connect(function(hit)
		local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
		if player then
			--print('Coin touched by '..player.Name)
			processCoinTouch(player, coin, COIN_REGEN_DELAY)
		end
	end)
	coinAnimation(coin)
end
