Vector2Value
Store a Vector2 in the object tree.
Vector2Value holds a two-component vector as an instance. Use it for screen sizes, offsets, and 2D directions that need to live in the tree.
Getting started
local size = Instance.new("Vector2Value")
size.Name = "PanelSize"
size.Value = Vector2.new(320, 180)
size.Parent = configFolderProperties
| Property | Type | Access | Default | Description |
|---|---|---|---|---|
Value | Vector2 | Read/write | Vector2.new(0, 0) | The stored vector. |
Notes
- Inherits from
ValueBase, which adds no members. - Cloning copies the vector.
- Vector components are stored as floats, so very precise values can lose a little precision.
See also
Vector3Valuefor 3D vectors.GuiObjectfor the properties that useVector2.
