local tweenService = game:GetService("TweenService")
local door1 = script.Parent.Door1
local door2 = script.Parent.Door2
local tweeningInformation = TweenInfo.new(
1,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
0,
false,
0
)
local door1Close = {
CFrame = CFrame.new(-711.728, 7.94, -64.345),
Orientation = Vector3.new(0, 90, 0)
}
local door1open = {
CFrame = CFrame.new(-711.728, 21.77, -64.345),
Orientation = Vector3.new(0, 90, 0)
}
local door2close = {
CFrame = CFrame.new(-711.727, 7.94, -51.645),
Orientation = Vector3.new(0, 90, 0)
}
local door2open = {
CFrame = CFrame.new(-711.727, 21.77, -51.645),
Orientation = Vector3.new(0, 90, 0)
}
local tween1open = tweenService:Create(door1,tweeningInformation,door1open)
local tween1close = tweenService:Create(door1,tweeningInformation,door1Close)
local tween2open = tweenService:Create(door2,tweeningInformation,door2close)
local tween2close = tweenService:Create(door2,tweeningInformation,door2open)
script.Parent.Detector1.Touched:Connect(function(hit)
tween1open:Play()
tween2open:Play()
wait(2)
tween1close:Play()
tween2close:Play()
end)
script.Parent.Detector2.Touched:Connect(function(hit)
tween1open:Play()
tween2open:Play()
wait(2)
tween1close:Play()
tween2close:Play()
end)
it spins the doors to the orientation 0, 0, 0 why

4 comments
Orientation is not very reliable, try using CFrame. Multiply the CFrames by CFrame.Angles(0, math.pi/2, 0). This rotates 90 degrees on the Y axis.
math stuff, so hot, may i ask why we are doing pi divided by 2? @incapaxx
nvm i got my answer
only problem with this is that the doors just disappear but they dont spin, any help cause i got no idea what that angles math thing does exacly