Skip to content

Commit 0ef4308

Browse files
Correct vector.new to vector.create
1 parent 9646254 commit 0ef4308

36 files changed

+98
-98
lines changed

content/en-us/characters/pathfinding.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ local player = Players.LocalPlayer
145145
local character = player.Character
146146
local humanoid = character:WaitForChild("Humanoid")
147147

148-
local TEST_DESTINATION = vector.new(100, 0, 100)
148+
local TEST_DESTINATION = vector.create(100, 0, 100)
149149

150150
local waypoints
151151
local nextWaypointIndex
@@ -213,7 +213,7 @@ local player = Players.LocalPlayer
213213
local character = player.Character
214214
local humanoid = character:WaitForChild("Humanoid")
215215

216-
local TEST_DESTINATION = vector.new(100, 0, 100)
216+
local TEST_DESTINATION = vector.create(100, 0, 100)
217217

218218
local waypoints
219219
local nextWaypointIndex
@@ -245,7 +245,7 @@ local player = Players.LocalPlayer
245245
local character = player.Character
246246
local humanoid = character:WaitForChild("Humanoid")
247247

248-
local TEST_DESTINATION = vector.new(100, 0, 100)
248+
local TEST_DESTINATION = vector.create(100, 0, 100)
249249

250250
local waypoints
251251
local nextWaypointIndex
@@ -286,7 +286,7 @@ local player = Players.LocalPlayer
286286
local character = player.Character
287287
local humanoid = character:WaitForChild("Humanoid")
288288

289-
local TEST_DESTINATION = vector.new(100, 0, 100)
289+
local TEST_DESTINATION = vector.create(100, 0, 100)
290290

291291
local waypoints
292292
local nextWaypointIndex
@@ -358,7 +358,7 @@ local player = Players.LocalPlayer
358358
local character = player.Character
359359
local humanoid = character:WaitForChild("Humanoid")
360360

361-
local TEST_DESTINATION = vector.new(100, 0, 100)
361+
local TEST_DESTINATION = vector.create(100, 0, 100)
362362

363363
local waypoints
364364
local nextWaypointIndex
@@ -525,7 +525,7 @@ To create a `Class.PathfindingLink` using this example:
525525
local character = player.Character
526526
local humanoid = character:WaitForChild("Humanoid")
527527

528-
local TEST_DESTINATION = vector.new(228.9, 17.8, 292.5)
528+
local TEST_DESTINATION = vector.create(228.9, 17.8, 292.5)
529529

530530
local waypoints
531531
local nextWaypointIndex

content/en-us/environment/global-wind.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ local gustCycleDelay = 5 -- Max duration between gust cycles in seconds
5050
local gustCycleDuration = 3.5 -- Duration of each gust cycle in seconds
5151

5252
-- During each gust cycle, a portion of "gust" will be added to "baseWind" in a ramped fashion
53-
local baseWind = vector.new(5, 0, 2) -- Base wind speed and direction
54-
local gust = vector.new(25, 0, 10) -- Gust speed and direction
53+
local baseWind = vector.create(5, 0, 2) -- Base wind speed and direction
54+
local gust = vector.create(25, 0, 10) -- Gust speed and direction
5555
local gustIntervals = 100 -- Number of iterations used to calculate each gust interval
5656
local dg = gustCycleDuration / gustIntervals
5757
local dgf = dg / gustCycleDuration

content/en-us/parts/terrain.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ To import a heightmap and optional colormap:
471471
You can script terrain generation using the `Class.Terrain` class. For example, to create terrain with grass material that fills a volume, you can use methods such as `Class.Terrain:FillBall()|FillBall()`, `Class.Terrain:FillBlock()|FillBlock()`, `Class.Terrain:FillCylinder()|FillCylinder()`, `Class.Terrain:FillRegion()|FillRegion()`, or `Class.Terrain:FillWedge()|FillWedge()`.
472472

473473
```lua title='Fill Block Volume'
474-
workspace.Terrain:FillBlock(CFrame.new(0, 0, 0), vector.new(4, 4, 4), Enum.Material.Grass)
474+
workspace.Terrain:FillBlock(CFrame.new(0, 0, 0), vector.create(4, 4, 4), Enum.Material.Grass)
475475
```
476476

477477
## Large-Scale Editing

content/en-us/production/monetization/engagement-based-payouts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ local Players = game:GetService("Players")
7575
local teleporter = script.Parent
7676
local showModal = true
7777

78-
local TELEPORT_POSITION = vector.new(1200, 200, 60)
78+
local TELEPORT_POSITION = vector.create(1200, 200, 60)
7979

8080
-- Teleport character to exclusive area
8181
local function teleportPlayer(player)

content/en-us/reference/engine/classes/BodyAngularVelocity.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ properties:
3737
second) into the desired [angular velocity][3] (radians per second). For
3838
example: Setting
3939
`Class.BodyAngularVelocity.AngularVelocity|AngularVelocity` to
40-
`vector.new(0, 1, 0) * math.rad(360)` ≈ `vector.new(0, 6.283, 0)` will
40+
`vector.create(0, 1, 0) * math.rad(360)` ≈ `vector.create(0, 6.283, 0)` will
4141
cause a part to spin around the Y axis once per second.
4242
code_samples:
4343
type: Vector3

content/en-us/reference/engine/classes/Camera.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,17 @@ properties:
6565
The most intuitive way to position and orient the `Class.Camera` is by
6666
using the `Datatype.CFrame.lookAt()` constructor. In the following
6767
example, the `Class.Camera` is positioned at
68-
`Datatype.Vector3|vector.new(0, 10, 0)` and is oriented to be looking towards
69-
`Datatype.Vector3|vector.new(10, 0, 0)`.
68+
`Datatype.Vector3|vector.create(0, 10, 0)` and is oriented to be looking towards
69+
`Datatype.Vector3|vector.create(10, 0, 0)`.
7070
7171
```lua
7272
local Workspace = game:GetService("Workspace")
7373
7474
local camera = Workspace.CurrentCamera
7575
camera.CameraType = Enum.CameraType.Scriptable
7676
77-
local pos = vector.new(0, 10, 0)
78-
local lookAtPos = vector.new(10, 0, 0)
77+
local pos = vector.create(0, 10, 0)
78+
local lookAtPos = vector.create(10, 0, 0)
7979
8080
Workspace.CurrentCamera.CFrame = CFrame.lookAt(pos, lookAtPos)
8181
```
@@ -104,7 +104,7 @@ properties:
104104
character = player.CharacterAdded:Wait()
105105
end
106106
107-
local pos = camera.CFrame * vector.new(0, 20, 0)
107+
local pos = camera.CFrame * vector.create(0, 20, 0)
108108
local lookAtPos = character.PrimaryPart.Position
109109
local targetCFrame = CFrame.lookAt(pos, lookAtPos)
110110
@@ -715,8 +715,8 @@ methods:
715715
local camera = Workspace.CurrentCamera
716716
717717
local castPoints = {
718-
vector.new(0, 10, 0),
719-
vector.new(0, 15, 0)
718+
vector.create(0, 10, 0),
719+
vector.create(0, 15, 0)
720720
}
721721
local ignoreList = {}
722722
@@ -810,7 +810,7 @@ methods:
810810
local function getActualRoll()
811811
local camera = workspace.CurrentCamera
812812
813-
local trueUp = vector.new(0, 1, 0)
813+
local trueUp = vector.create(0, 1, 0)
814814
local cameraUp = camera:GetRenderCFrame().upVector
815815
816816
return math.acos(trueUp:Dot(cameraUp))
@@ -1291,7 +1291,7 @@ methods:
12911291
12921292
local camera = Workspace.CurrentCamera
12931293
1294-
local worldPoint = vector.new(0, 10, 0)
1294+
local worldPoint = vector.create(0, 10, 0)
12951295
local vector, onScreen = camera:WorldToScreenPoint(worldPoint)
12961296
12971297
local screenPoint = Vector2.new(vector.X, vector.Y)
@@ -1350,7 +1350,7 @@ methods:
13501350
13511351
local camera = Workspace.CurrentCamera
13521352
1353-
local worldPoint = vector.new(0, 10, 0)
1353+
local worldPoint = vector.create(0, 10, 0)
13541354
local vector, onScreen = camera:WorldToViewportPoint(worldPoint)
13551355
13561356
local viewportPoint = Vector2.new(vector.X, vector.Y)

content/en-us/reference/engine/classes/EditableMesh.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,14 @@ description: |
115115
local function makeSharpCube()
116116
local eMesh = AssetService:CreateEditableMesh()
117117
118-
local v1 = eMesh:AddVertex(vector.new(0, 0, 0))
119-
local v2 = eMesh:AddVertex(vector.new(1, 0, 0))
120-
local v3 = eMesh:AddVertex(vector.new(0, 1, 0))
121-
local v4 = eMesh:AddVertex(vector.new(1, 1, 0))
122-
local v5 = eMesh:AddVertex(vector.new(0, 0, 1))
123-
local v6 = eMesh:AddVertex(vector.new(1, 0, 1))
124-
local v7 = eMesh:AddVertex(vector.new(0, 1, 1))
125-
local v8 = eMesh:AddVertex(vector.new(1, 1, 1))
118+
local v1 = eMesh:AddVertex(vector.create(0, 0, 0))
119+
local v2 = eMesh:AddVertex(vector.create(1, 0, 0))
120+
local v3 = eMesh:AddVertex(vector.create(0, 1, 0))
121+
local v4 = eMesh:AddVertex(vector.create(1, 1, 0))
122+
local v5 = eMesh:AddVertex(vector.create(0, 0, 1))
123+
local v6 = eMesh:AddVertex(vector.create(1, 0, 1))
124+
local v7 = eMesh:AddVertex(vector.create(0, 1, 1))
125+
local v8 = eMesh:AddVertex(vector.create(1, 1, 1))
126126
127127
addSharpQuad(eMesh, v5, v6, v8, v7) -- Front
128128
addSharpQuad(eMesh, v1, v3, v4, v2) -- Back

content/en-us/reference/engine/classes/Humanoid.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1861,7 +1861,7 @@ methods:
18611861
`Class.Workspace.CurrentCamera|CurrentCamera`.
18621862
18631863
```lua
1864-
humanoid:Move(vector.new(0, 0, -1), true)
1864+
humanoid:Move(vector.create(0, 0, -1), true)
18651865
```
18661866
18671867
When this function is called, the `Class.Humanoid` will move until the

content/en-us/reference/engine/classes/Instance.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,11 +1265,11 @@ methods:
12651265
returned by default.
12661266
12671267
For example, the following code snippet sets the instance's
1268-
**InitialPosition** attribute to `Datatype.Vector3|vector.new(0, 10, 0)`:
1268+
**InitialPosition** attribute to `Datatype.Vector3|vector.create(0, 10, 0)`:
12691269
12701270
```lua
12711271
local part = workspace.Part
1272-
part:SetAttribute("InitialPosition", vector.new(0, 10, 0))
1272+
part:SetAttribute("InitialPosition", vector.create(0, 10, 0))
12731273
```
12741274
12751275
#### Limitations

content/en-us/reference/engine/classes/RayValue.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ description: |
1212
to create a new RayValue named "Value" within the `Class.Workspace`. It
1313
creates a ray at (0, 50, 0) and it faces in the positive-X direction.
1414
15-
`Instance.new("RayValue").Value = Ray.new(vector.new(0, 50, 0), vector.new(10, 0, 0))`
15+
`Instance.new("RayValue").Value = Ray.new(vector.create(0, 50, 0), vector.create(10, 0, 0))`
1616
1717
Since there is no trivial way to edit rays within Studio, sometimes it is
1818
better to use a CFrameValue instead (which can be changed through a part or

0 commit comments

Comments
 (0)