How do I stop a tween from automatically changing orientation?
I'm making doors for somebody, and I'm using TweenService for it. It's not moving my doors properly sometimes. I feel like this is a silly mistake.
Code: (only variables)
01 | local tweens = game:GetService( "TweenService" ) |
02 | local tweeninfo = TweenInfo.new( |
04 | Enum.EasingStyle.Sine, |
05 | Enum.EasingDirection.In, |
11 | local doorAopened = { CFrame = CFrame.new(s.DoorAOpen.Position) } |
12 | local doorBopened = { CFrame = CFrame.new(s.DoorBOpen.Position) } |
13 | local doorAclosed = { CFrame = CFrame.new(s.DoorAClosed.Position) } |
14 | local doorBclosed = { CFrame = CFrame.new(s.DoorBClosed.Position) } |
16 | local doorAopen = tweens:Create(doorA,tweeninfo,doorAopened) |
17 | local doorBopen = tweens:Create(doorB,tweeninfo,doorBopened) |
18 | local doorAclose = tweens:Create(doorA,tweeninfo,doorAclosed) |
19 | local doorBclose = tweens:Create(doorB,tweeninfo,doorBclosed) |
Gif of what happens: https://i.imgur.com/Gob8XGI.gifv
The broken door is rotated, so the doors have an orientation property of 0,-90,0. The normal door has an orientation of 0,0,0. I believe what is happening is that the tweens are automatically tweening the orientation property of the doors to 0,0,0 even though I did not specify it.
I tried this and copied it for each one, but it didn't work.
2 | doorAopened.CFrame = CFrame.new(s.DoorAOpen.Position) |
3 | doorAopened.Orientation = Vector 3. new( 0 , 0 , 0 ) |
Anyone know how to fix this?