Tweening being odd

So i am trying to do a lever tween but this happens:
robloxapp-20200530-1211245.wmv (607.0 KB)

Its doing a weird turning thing when it goes down but it works properly when it goes back up.
Is it something to do with the Easing style of direction of is it because i’m using position and orientation instead of Cframe?
I dont really know Cframe that well, but must i used it?
This is the code:

local leaver = script.Parent
local door = game.Workspace.Door
local TweenService= game:GetService("TweenService")
local leverpressable = true

local Info = TweenInfo.new(0.5, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, false, 0)

local Info2 = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut, 0, false, 0)

local goal = {Position = Vector3.new(-15.2, 4.59, -2.567); Orientation = Vector3.new(-60, 180, 90);}

local goal2 = {Orientation = Vector3.new(-60, 0, -90); Position = Vector3.new(-15.2, 6.613, -2.465);}

local levertween = TweenService:Create(leaver, Info, goal)
local levertween2 = TweenService:Create(leaver, Info2, goal2)

You set the Z axis of Orientation to -90 (in goal2), are you sure you didn’t mean 90 (like goal1)? Your lever is only supposed to rotate on one axis, right?

Edit: Or actualy, you need the Y axis to stay the same since it’s not rotating that way. So, try replacing the 180 with 0.

1 Like