Beginners Scripting Guide (BETA)
  • Getting Started
  • Basic Data Types
  • Variables
  • Basic global functions
  • Number Arithmetic & Compounds Assignment
  • If statement
  • Function
  • Table & Dictionary
  • Loops
  • Creating An Object
  • Understanding Client & Server
  • RemoteEvent
  • Unfinished & In-progress
    • Methods
    • RemoteFunction
    • Basic libraries
    • Basic Services
    • Basic of Vector3 and CFrame
    • Basic built-in events
Powered by GitBook
On this page
  • NUMBER
  • STRING
  • BOOLEAN

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 by 1 or 0

  • Example: 0b10 = 2

Hexadecimal:

  • Format: 0x followed by 0 to 9 or A (10) to F (16)

  • Example: 0xA = 10

Exponential:

  • Format: Decimal number followed by e or e+ then an integer which is the power of 10

  • Example: 2e11 = 2 * 10^11

Decimal:

  • Format: Plain number from 0 to 9

  • 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.

PreviousGetting StartedNextVariables

Last updated 11 months ago