Why is TweenService weirdly rotating?
Asked by
5 years ago Edited 5 years ago
Hello!
I am new to TweenService and I had some issues. Can someone help me with it?
My Part makes a weird 90° turn. Why is that? I have no line of code changing the rotation.
Here is a short video of it: https://gyazo.com/f74e2d439fae96d90d76d1c5c6a9aa58
I hope someone can help! Have a nice day!
My script:
local TweenService = game:GetService("TweenService")
local door1 = script.Parent.DoorLeft:WaitForChild("Union")
local door2 = script.Parent.DoorRight:WaitForChild("Union")
local door12 = script.Parent.DoorLeft:WaitForChild("Part")
local door12 = script.Parent.DoorRight:WaitForChild("four")
local tweeningInformation = TweenInfo.new(
0.5,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
0,
false,
0
)
01 | local door 1 Open = { CFrame = CFrame.new( 82.82 , 4.693 , 80.553 ) } |
02 | lcal door 2 Open = { CFrame = CFrame.new( 82.82 , 4.693 , 62.559 ) } |
03 | local door 1 Close = { CFrame = CFrame.new( 82.82 , 4.693 , 74.707 ) } |
04 | local door 2 Close = { CFrame = CFrame.new( 82.82 , 4.693 , 68.511 ) } |
05 | local tween 1 open = TweenService:Create(door 1 ,tweeningInformation,door 1 Open) |
06 | local tween 1 close = TweenService:Create(door 1 ,tweeningInformation,door 1 Close) |
07 | local tween 2 open = TweenService:Create(door 2 ,tweeningInformation,door 2 Open) |
08 | local tween 2 close = TweenService:Create(door 2 ,tweeningInformation,door 2 Close) |
10 | script.Parent.Detector 1. Touched:Connect( function (hit) |
17 | script.Parent.Detector 2. Touched:Connect( function (hit) |