I have a simple tween sliding door but when I play it, it turns 90 degrees which is not what it is meant to do.
Here is the code:
local TweenService = game:GetService("TweenService")
local door = script.Parent:WaitForChild("Door")
local tweeningInformation = TweenInfo.new(
7,
Enum.EasingStyle.Quad,
Enum.EasingDirection.Out,
0,
false,
0
)
local door1Open = {CFrame = CFrame.new(-210.651, 4.164, 158.961)}
local door1Close = {CFrame = CFrame.new(-210.651, 4.164, 155.536)}
local tween1open = TweenService:Create(door,tweeningInformation,door1Open)
local tween1close = TweenService:Create(door,tweeningInformation,door1Close)
script.Parent.Entrance.ClickDetector.MouseClick:Connect(function()
tween1open:Play()
wait(10)
tween1close:Play()
end)
script.Parent.Exit.ClickDetector.MouseClick:Connect(function()
tween1open:Play()
wait(10)
tween1close:Play()
end)
Thanks

1 comment
Hi!, when I add that it just doesnt work at all, its strange.