First off I'm making a money script. Example: 1$ 10ยข I'm wondering if I can subtract a value from two integers, allow me to explain. Example: A = 100 B = 10 Say I want to subtract 105 from A could I make A = 0 and subtract 5 from B to get the full value? Result: A = 0 B = 5
Would I need a load of "if" statements or what? Been racking my brain at this for a few days. I know I could probably use NumberValue but it doesn't seem very adaptable for future products that way.
Thank you for the support.
Do an if statement to check if the values negative. Here's an example,
local intvalue = -1 --this would be the value of the intvalue you're checking if intvalue < 0 then intvalue = 0 end
If the intvalue is a negative it will make it 0. I think that's what you were asking. Good luck!