Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Is there a shortcut for arithmetic operations in values?

The title is messy, just made it look like a question. I will explain it now. Example: when you have a number value and you want to sum 1 to it, you'll do this:

value = value + 1

right? But most of my codes are not so simple and doing that will make them messy. Is there a shortcut to perform the same action? Like some languages have:

value += 1

1 answer

1 value = value + 1

Is the only way but if you are adding multiple things you can do

1 value = value + (1+2+3+4)

Roblox's Lua isn't the most efficient programming languadge for numbers and arithmetics. Sorry!

2 comments

0

Okay, thanks.

0

Im stalking your questions, just wanting to point out ROBLOX isnt the lang, its LUA

This discussion is preserved as it was. New answers, comments, and votes are closed.