Basic Data Types
✏ Beginners Scripting Guide ✏
In this section, we will be discussing about basic data types. Data can be a number, booleans, string, and much more. But, today we will only learn about number, booleans, and string because those are the basic data types.
NUMBER
The number data type consists of
Integer : Negative, 0, and positive numbers. Float : Numbers with a decimal place.
NUMBER NOTATION
Binary:
Format:
0b
followed by1
or0
Example:
0b10 = 2
Hexadecimal:
Format:
0x
followed by0
to9
orA
(10) toF
(16)Example:
0xA = 10
Exponential:
Format: Decimal number followed by
e
ore+
then an integer which is the power of 10Example:
2e11 = 2 * 10^11
Decimal:
Format: Plain number from
0
to9
Example:
10 = 10
Note: Roblox doesn't support complex numbers.
STRING
The string data type can be created by enclosing a group of characters by " or ' and there are others way to do it. But, we will use " or ' for today. Example: "Hello", and 'Hi'.
BOOLEAN
Booleans are data types consists of true and false. This is usually used in conditions for loops and if statements. We will cover the if statement and loops in upcoming topic.
Last updated