Hi, I’m using the age-old ghost tween to make a door open. The opening animation is fine, but the closing animation is, uh…
The ghost part is selected so you can see that the issue is with the original tween. It moves like that even though only the Y axis’s rotation is meant to be changed. This is what the tween script looks like.
cd.MouseClick:Connect(function()
if debounce == false then
debounce = true
if open == false then
local openTween = ts:Create(ghost,TweenInfo.new(1),{Position = Vector3.new(-157.75, 7.125, -1.56), Rotation = Vector3.new(0,-120,0)})
openTween:Play()
openTween.Completed:Wait()
open = true
debounce = false
else
local closeTween = ts:Create(ghost,TweenInfo.new(1),{Position = originPosition,Rotation = Vector3.new(0,0,0)})
closeTween:Play()
closeTween.Completed:Wait()
open = false
debounce = false
end
end
end)
I’m confused, especially because the X and Z rotation stays at 0 for the opening tween.