Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Workspace.Conveyor.Script:8: bad argument #1 to '?' (Vector3 expected, got nil)

Asked by 6 years ago
Edited 6 years ago

I got that error trying to run a script. I've checked around, and everyone says it's about not defining position, but the script isn't dealing with a position, it's dealing with orientation.

Here's the script:

local part = game.workspace.Conveyor
local Turtle = game.workspace.Model
local Turtle2 = {Turtle.a, Turtle.b, Turtle.c, Turtle.d, Turtle.e, Turtle.f, Turtle.g}
local orient = Turtle2.Orientation

part.Velocity = Vector3.new(3, 0, 0)
wait(3)
orient = orient + Vector3.new(0, 90, 0)
Turtle2.Orientation = orient
0
Turtle2 is a table and your orient variable holds the non existent orientation field of the Turtle2 variable which is nil. If you are trying to rotate an entire model, I recommend using SetPrimaryPartCFrame(). RayCurse 1518 — 6y

Answer this question