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

What is an IntValue/IntegerValue?

I heard about this thing called a "IntValue" and, could someone tell me what it does?

####Re-edited by JesseSong

2 answers

IntValue short for Integer Value is used for numbers only.

local IntValue = 1234567890

2 comments

1

Thanks

0

No problem!

(I know this question is over a year old at this point, but I'd like to add a better description to the previous answer so that the newer developers can have a greater understanding of IntValues!)

##What are IntValues?

An IntValue or an IntergerValue is a data-type that confines a 64-bit integer. IntValues/IntegerValues can incarcerate any type of number except decimals and strings.

##EX:

A sample would be this: 9858943 (of course this can be any number. This number is for demonstrational purposes).

But not this:

98848.342 [Because Intvalues cannot hold decimals, a NumberValue would be suitable for this case.]

##Why are IntValues useful?

Intvalues are useful for properties/objects that can input numbers alongside a datatype.

A strong example would be items that are notional like Leaderstats, voting system, plotting- system and more.

[If I am missing something please comment.]

[//----------------------------------------------------------------------------------------------------//] ##What are NumberValues?

(This is off-topic to your question, but you can use a NumberValue if you want to dispatch decimal datatype).

NumberValues are essentially IntValues. The only difference is that NumberValues can only hold decimals, whereas IntValues CANNOT!

This is just a brief explanation of NumberValues. You can use the developer hub for a greater understanding of NumberValues/IntValues.

Thanks, JesseSong!

##References: IntValues, NumberValues

Refined a minor grammatical error. Date: February 19, 2021

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