So, I want to create a sliding door by tweening. Everything working correctly except that it’s rotating. I’ve looked at other topics on rotation with tweeting but I’m having trouble understanding them. I basically need help with knowing how to rotate a tween so I can make the orientation specific or know how to stop it.
Here is my current script:
local TS = game:GetService("TweenService")
local D1 = game.Workspace.D1
local D1_Open = CFrame.new(game.Workspace.D1Goal.Position)
local cooldown = false
local TweeningInfoD1 = TweenInfo.new(
1,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
0,
false,
0
)
local PartPropertiesD1 = {
CFrame = D1_Open;
Orientation = Vector3.new(0,180,0)
}
script.Parent.Touched:Connect(function()
if cooldown == false then
cooldown = true
local Tween = TS:Create(D1,TweeningInfoD1,PartPropertiesD1)
Tween:Play()
wait(5)
cooldown = false
end
end)