Skip to Content
Kinemium
Datatypes

Datatypes

Constructors, members, and methods for every datatype Kinemium exposes to Luau.

Datatypes are value types. You create them with a constructor such as Vector3.new(), pass them to properties and methods, and compare them by value. Most are immutable: read a field, derive a new value, and assign it back.

local size = Vector3.new(4, 1, 2)
local half = size / 2
print(half) -- 2, 0.5, 1

The pages in this section group related types. Every datatype installed as a Luau global is listed below.

All datatypes

TypeConstructorWhat it holds
AxesAxes.new(Enum.Axis...)A set of enabled axes.
BrickColorBrickColor.new(number or name)A named color from the brick palette.
CFrameCFrame.new(...)A position and 3D rotation.
Color3Color3.new(r, g, b)An RGB color with channels from 0 to 1.
ColorSequenceColorSequence.new(...)Colors interpolated over time.
ColorSequenceKeypointColorSequenceKeypoint.new(time, color)One stop in a color sequence.
ContentContent.fromUri(uri)A reference to an asset or object.
DateTimeDateTime.now()A point in time with Unix timestamp access.
DockWidgetPluginGuiInfoDockWidgetPluginGuiInfo.new(...)Dock state and size hints for a plugin widget.
FacesFaces.new(Enum.NormalId...)A set of enabled faces.
FontFont.new(family, weight, style)A font family, weight, and style.
NumberRangeNumberRange.new(min, max)A minimum and maximum number.
NumberSequenceNumberSequence.new(...)Numbers interpolated over time.
NumberSequenceKeypointNumberSequenceKeypoint.new(time, value)One stop in a number sequence.
OverlapParamsOverlapParams.new()Filters for spatial overlap queries.
PathWaypointPathWaypoint.new(position, action, label)One point on a path.
PhysicalPropertiesPhysicalProperties.new(...)Density, friction, and elasticity.
QuaternionQuaternion.new(x, y, z, w)A rotation in quaternion form.
RandomRandom.new(seed?)A seeded random number generator.
RayRay.new(origin, direction)An origin and direction in 3D.
RaycastParamsRaycastParams.new()Filters for raycasts.
RaycastResultNot constructibleThe hit returned by a raycast.
RectRect.new(min, max)A 2D rectangle.
Region3Region3.new(min, max)An axis-aligned 3D box.
Region3int16Region3int16.new(min, max)A 3D box with 16-bit integer corners.
SecurityCapabilitiesSecurityCapabilities.new(...)A set of security capabilities.
TerrainRegionNot constructibleA saved piece of terrain.
TweenInfoTweenInfo.new(...)Timing and easing for a tween.
UDimUDim.new(scale, offset)A scale and pixel offset pair.
UDim2UDim2.new(xScale, xOffset, yScale, yOffset)Two UDim values, one per axis.
UniqueIdUniqueId.new()A generated unique identifier.
Vector2Vector2.new(x, y)Two floating-point components.
Vector2int16Vector2int16.new(x, y)Two 16-bit integer components.
Vector3Vector3.new(x, y, z)Three floating-point components.
Vector3int16Vector3int16.new(x, y, z)Three 16-bit integer components.

Where to look

PageTypes
Vectors and rotationsVector2, Vector3, Vector2int16, Vector3int16, Quaternion
CFrameCFrame
ColorsColor3, BrickColor, ColorSequence, ColorSequenceKeypoint
Interface and timingUDim, UDim2, Rect, TweenInfo, Font, DockWidgetPluginGuiInfo
SequencesNumberRange, NumberSequence, NumberSequenceKeypoint
Spatial queriesRay, Region3, Region3int16, PhysicalProperties, PathWaypoint, RaycastParams, RaycastResult, OverlapParams, TerrainRegion
MiscellaneousAxes, Faces, UniqueId, Content, DateTime, Random, SecurityCapabilities

Common behavior

  • Constructors reject arguments of the wrong type and raise an error instead of returning nil.
  • == compares values, not identity. Two separately constructed values with the same components are equal.
  • tostring() returns a readable form, which is useful in logs but not a serialization format.
  • Members marked read-only return a new value or a copy. Assigning to them raises an error.
  • Optional constructor arguments default to zero unless the type page says otherwise. Quaternion defaults w to 1, and TweenInfo has its own defaults.

On this page