Cash collector giving too much money

I did this, it doesn’t give too much money that often anymore but it’s still doing that sometimes (note it happens suddenly, not all the time), mostly when tycoon is finished. I think it still does Touched event multiple times before removing the value.

Here’s a pic where you can see how much money it sometimes gives: pic

There’s no dropper which would drop billions, they only drop between 5-20.

Yeah, this also once happened. I’ve noticed it happens when the game lags a little.

  • Debounce the button with a short yield.
  • Deduct the money from whatever value the player’s owed money is in before giving them the money, this way, even if it runs multiple times you can be pretty certain it wont give them the money twice.
2 Likes

If the drop value is from 5-20 then even with function running multiple times it would not reach 2mil like he said. It must be value of drop that is causing it or maybe upgrader (or multipleyer) that is causing your problem.

Anyway, after days of fighting this bug, I’ve found out that kit creator had actually warned to not use * in upgraders because lag (even small one) can cause value to dublicate multiple times, resulting in extreme value.

Use + instead.

I’m finally free from this bug, now I can keep working on other stuff in my tycoon. :slight_smile: