Hello! I am new to TweenService and I had some issues. Can someone help me with it?
My Part makes a weird 90° turn. Why is that? I have no line of code changing the rotation.
Here is a short video of it: https://gyazo.com/f74e2d439fae96d90d76d1c5c6a9aa58
I hope someone can help! Have a nice day!
My script:
local TweenService = game:GetService("TweenService")
local door1 = script.Parent.DoorLeft:WaitForChild("Union")
local door2 = script.Parent.DoorRight:WaitForChild("Union")
local door12 = script.Parent.DoorLeft:WaitForChild("Part")
local door12 = script.Parent.DoorRight:WaitForChild("four")
local tweeningInformation = TweenInfo.new(
0.5,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
0,
false,
0
)
local door1Open = {CFrame = CFrame.new(82.82, 4.693, 80.553)}
lcal door2Open = {CFrame = CFrame.new(82.82, 4.693, 62.559)}
local door1Close = {CFrame = CFrame.new(82.82, 4.693, 74.707)}
local door2Close = {CFrame = CFrame.new(82.82, 4.693, 68.511)}
local tween1open = TweenService:Create(door1,tweeningInformation,door1Open)
local tween1close = TweenService:Create(door1,tweeningInformation,door1Close)
local tween2open = TweenService:Create(door2,tweeningInformation,door2Open)
local tween2close = TweenService:Create(door2,tweeningInformation,door2Close)
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)

1 comment
Pls put this in a code block by using
Code here