Want a special badge and 30 bux? Make some PolyWorld! Content and post it in the Creations forum!
Dark mode is incomplete! Please report any issues to the Discord.

Vector3

LocalScripts Scripts

Vector3 stores an X, Y, Z triple used for positions, sizes, rotations in degrees, and velocities.


Overview

Properties

  • .X : number
  • .x deprecated : number
  • .Y : number
  • .y deprecated : number
  • .Z : number
  • .z deprecated : number

Methods


API

Properties

X

X : number
X component.

x

x deprecated : number
Identical to X.
No longer recommended for use.

Y

Y : number
Y component.

y

y deprecated : number
Identical to Y.
No longer recommended for use.

Z

Z : number
Z component.

z

z deprecated : number
Identical to Z.
No longer recommended for use.

Methods

new

new(x: number?, y: number?, z: number?) : Vector3
Creates a Vector3 table with both PascalCase and lowercase fields for compatibility.

part.Position = Vector3.new(0, 10, 0)
part.Size = Vector3.new(4, 1, 4)