Vector2:
A Vector2 has two values - an X ordinate, and a Y ordinate. They're kind of like those coordinates you use in school on graphs. I'm sure you've seen something like
(1, 5)
somewhere before. This means that on a graph you go to the right 1, and then up 5. That's because a coordinate uses an X and a Y value. It looks like this
(x, y)
That's really all there is to it. Usually, the use of Vector2s are in doing simple calculations that UDim2s do not have built in. When people talk about the values inside a Vector2,
X is horizontal, or width
Y is vertical, or height
Vector3:
A Vector3 is a userdata that holds three values inside it. This doesn't have to be a 3D position, it could be a size as well.
The three values are an X coordinate, a Y coordinate, and a Z coordinate. When combined, these coordinates can represent a 3D point in space. They're kind of like those coordinates you use in school on graphs. I'm sure you've seen something like (1, 5) somewhere before. This means that on a graph you go to the right 1, and then up 5. That's because a coordinate uses an X and a Y value. It looks like (x, y), sometimes written as
x
y
. This is a 2D vector, or in Roblox, a Vector2. We need a 3D vector, or Vector3. So we add another value, a Z value. This gives us (x, y, z), which can also be written as
x
y
z
That's really all there is to it. These numbers can be used for the Position of things, the Size of things, or anything else that needs 3 numbers to work. When people talk about the values inside a Vector3,
X is sideways component, or width.
Y is the vertical component, or height.
Z is the forward component, or depth.
If this helped click the Accept Answer button.
And i see you're on Scripting helpers Aka, cool!
1 comment
Thanks :] If I had one rep I'd upvote this