Is there a way to keep the orientation of an part, when your moving it using CFrame.new?
So I have a gate script, But when it moves, it sets the orientation slowly back to 0, when we need it at 0,90,0. Is there any possible way to achieve this? Here is the server script:
01 | local TweenService = game:GetService( "TweenService" ) |
02 | local door 1 = script.Parent.Parent.Parent.Part 1 |
03 | local tweeningInformation = TweenInfo.new( |
05 | Enum.EasingStyle.Linear, |
06 | Enum.EasingDirection.Out, |
11 | local door 1 Open = { CFrame = CFrame.new(- 161.498 , 15.143 , - 125.72 ) } |
12 | local door 1 Close = { CFrame = CFrame.new(- 161.498 , 5.666 , - 125.72 ) } |
13 | local tween 1 open = TweenService:Create(door 1 ,tweeningInformation,door 1 Open) |
14 | local tween 1 close = TweenService:Create(door 1 ,tweeningInformation,door 1 Close) |
16 | script.Parent.ClickDetector.MouseClick:Connect( function () |