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

12:21:44.588 - Workspace.Prism.Script:7: bad argument #2 to '?' (Vector3 expected, got number)?

Asked by
danglt 185
6 years ago
Edited 6 years ago
local part = script.Parent
while true do
local Orotate = script.Parent.Orientation
wait(.8)

part.Orientation = Vector3.new(0,Orotate - 1, 0)
end`
0
Orotate will be a vector3 value already 95jake95 14 — 6y

2 answers

Log in to vote
1
Answered by 6 years ago
Edited 6 years ago

Assuming the ` after your end is just a typo in your pasting code, here's what I assume.

local part = script.Parent
while true do
    wait(.8)
    part.Orientation = Vector3.new(part.Orientation.X,part.Orientation.Y - 1, part.Orientation.Z)
end

That code will move it to the current orientation minus the Y orientation.

Ad
Log in to vote
0
Answered by 6 years ago

local Orotate = script.Parent.Orientation.Y maybe

Answer this question