I am making a sliding door, but tweening isn’t working because the children of the object (attached via weld constraint)(other unions and parts containing decals) are not moved. How can I make everything move? I cannot add multiple parts into the table because Position can only be in there once.
local tweenService = game:GetService("TweenService")
local d1 = script.Parent.d1
local d2 = script.Parent.d2
local Info = TweenInfo.new(
20,
Enum.EasingStyle.Sine,
Enum.EasingDirection.Out,
1,
true,
2
)
local Goals1 =
{
Position = d1.Position + Vector3.new(0, 0, -6);
}
local Goals2 =
{
Position = d2.Position + Vector3.new(0,0,6)
}
local openDoorTween1 = tweenService:Create(d1, Info, Goals1)
local openDoorTween2 = tweenService:Create(d2, Info, Goals2)
openDoorTween1:Play()
openDoorTween2:Play()
Yes. Lots of weld constraints. I figured out the problem: d1 is moving. Except, d1 is a small transparent block with all the main parts welded to it, the ones supposed to move, not moving. I thought they would be automatically taken along. Do you know how I can fix this?
local Goals1 =
{
Position = d1.Position + Vector3.new(0, 0, -6);
}
local Goals2 =
{
Position = d2.Position + Vector3.new(0,0,6)
}
those are tables
so it would be
local openDoorTween1 = tweenService:Create(d1, Info, {Goals1.Position})
local openDoorTween2 = tweenService:Create(d2, Info, {Goals2.Position})
Yeah sure. I’ve linked it below. Should work.
I also tried tweening with just a standard part welded to another standard part via weld constraint, but only the one named in the tween moved. Link