script.Parent.Door.Handles.Knobs.Handle1.ClickDetector.MouseClick:Connect(function()
if script.Parent.Open.Value == true then
local TweenService = game:GetService("TweenService") --Gets the TweenService
local TweenPart = script.Parent.Door.Hinge --Part that you wan to tween
local TweenInformation = TweenInfo.new(
1, -- Time/length
Enum.EasingStyle.Quad, -- EasingStyle
Enum.EasingDirection.Out, -- EasingDirection
1, -- How many times tween will repeat, negative numbers if you want to loop it
false, -- Reverse the Tween Session (Turn into the new given Properties, and go turn back into the normal part's properties. Boolvalue)(true or false)
1 -- Delay between tweens(seconds).
)
local TweenGoals = {
Orientation = Vector3.new(0,-90,0);
}
local TweenAnimation = TweenService:Create(TweenPart, TweenInformation, TweenGoals)
TweenAnimation:Play()
else
local TweenService = game:GetService("TweenService") --Gets the TweenService
local TweenPart = script.Parent.Door.Hinge --Part that you wan to tween
local TweenInformation = TweenInfo.new(
1, -- Time/length
Enum.EasingStyle.Quad, -- EasingStyle
Enum.EasingDirection.Out, -- EasingDirection
1, -- How many times tween will repeat, negative numbers if you want to loop it
false, -- Reverse the Tween Session (Turn into the new given Properties, and go turn back into the normal part's properties. Boolvalue)(true or false)
1 -- Delay between tweens(seconds).
)
local TweenGoals = {
Orientation = Vector3.new(0, 180, 0);
}
local TweenAnimation = TweenService:Create(TweenPart, TweenInformation, TweenGoals)
TweenAnimation:Play()
end
end)
Here Is A Script And Hinge Is A Primary part Of The Model So I Amused By Changing The Primary Part Rotation It Will Rotate The Door But Nothing Happens

1 comment
iirc I don't think you can set the orientation directly you might have to do it via CFrame