Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i stop an IntValue from going negative?

Asked by
sad_eyez 162
8 years ago

I make money scripts a lot and I hate it when the intvalue goes negative, and i know theres a way to make it not go negative so, if anyone can help me out with this that would be great, thanks in advance?

1 answer

Log in to vote
0
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
8 years ago

Since you haven't provided any script, here are some options: When you deduct cash, check if that have enough, OR just have a while loop, that if the values goes below 0, set it back to 0.

0
well i want to keep the money going up, and not end at 2 billion sad_eyez 162 — 8y
Ad

Answer this question