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.

local function Swing()
    while true do
        for i=-30,-120,-2 do
            script.Parent.Orientation = Vector3.new(0,90,i)
            wait(0.01)
        end
        wait(2)
        for i=-120,-30,2 do
            script.Parent.Orientation = Vector3.new(0,90,i)
            wait(0.01)
        end
        wait(2)
    end
end

wait(2)
Swing()

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