Tween not working for weld (URGENT HELP NEEDED)

Hey I’m trying to tween a door. I made a primary part which is invisible and covers the entire door. I connected all the welds to that part, and tried to tween it. However, only the primary part seems to be getting tweened. If anyone knows why this might be, please feel free to let me know. Your help will be appreciated. :smiley:
Code:

local door1 = door.Door1

local door2 = door.Door2

local doorTweenInfo = TweenInfo.new(1,

Enum.EasingStyle.Sine,

Enum.EasingDirection.Out,

0,

false,

0

)

local door1TweenGoals = {CFrame = CFrame.new(Vector3.new(door1.PrimaryPart.Position + Vector3.new(door1.PrimaryPart.Size.X, 0, 0)))}

local door2TweenGoals = {CFrame = CFrame.new(Vector3.new(door2.PrimaryPart.Position - Vector3.new(door2.PrimaryPart.Size.X, 0, 0)))}

local door1Tween = TweenService:Create(door1.PrimaryPart, doorTweenInfo, door1TweenGoals)

local door2Tween = TweenService:Create(door2.PrimaryPart, doorTweenInfo, door2TweenGoals)

door1Tween:Play()
door2Tween:Play()

image
image

1 Like

Your weld constraints seem to be disabled. Have you enabled them?

Yes, indeed. They are enabled.

Update: I tried changing it’s CFrame, like without tweening and it still only changes the CFrame for the primary part rather than the entire model. Maybe there’s perhaps something wrong with the weld constraints?

unfortunately you cannot use tweenservice to tween models

but there is this!

but surely you should be able to tween a certain part connected to other parts?

I believe unless you’re using setprimarypartcframe, it won’t work (not sure but from my experience it won’t )

@YellowBannana898

This method works, BUT it is highly deoptimized. Because:

What answer @InedibleGames is false, and you shouldn’t listen to his advice as this code is deoptimized. You can refer to this tutorial instead: Introduction to Tweening Models

in that case then take a look at this too

This has nothing to defend your side.

One, you showed a code that’s supposed not to be used because of the deprecated functions used in it. Then, I already pointed out why it is deoptimized and how to optimize it(which is using the new pivot API functions). You then show a post that counters nothing but explaining why constraints shouldn’t be use in tweening models.

Second, your post is also invalid. You should’ve read further before posting:

Says the one who got rude when I was being nice the whole time. :man_shrugging: @luisgamercooI231fan

1 Like

And I corrected that flaw in my previous post.