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

Trying to rotate something? An old Lua scripter

Asked by 7 years ago

So, I am someone who scripted Lua in the old days, back when orientation was called rotation, so, when I tried to script something new, it isn't working, there is no error message in the output log. So, here is the script. Please help me figure out why it isn't working.

01local function Swing()
02    while true do
03        for i=-30,-120,-2 do
04            script.Parent.Orientation = Vector3.new(0,90,i)
05            wait(0.01)
06        end
07        wait(2)
08        for i=-120,-30,2 do
09            script.Parent.Orientation = Vector3.new(0,90,i)
10            wait(0.01)
11        end
12        wait(2)
13    end
14end
15 
16wait(2)
17Swing()

1 answer

Log in to vote
0
Answered by 7 years ago

Try using cframe*angles instead of orientation

Look up cframe*angles in the wiki it's an easy fix

Ad

Answer this question