Tweening train doors

Hey everybody, I’m trying to tween some train doors but the problem is, you can’t really tween an unanchored part. I’ve tried welding the train door to the carriage and changing its C1 property and it moves, but it doesn’t move into the position I want it to, instead it goes off in some random place.

I want to know if there’s an actual way to weld the doors to the train carriage while being a way to tween the doors as well. I know it’s possible since I have seen other games achieve this.

2 Likes

Have you tried looking at this? You could try changing the C1 CFrame with CFrame.Angles in Studio in the command line, I remember doing that to see how I needed to rotate weapons welded onto a player in an old game of mine.

2 Likes

That means you’re not adjusting the C1 correctly. Could you show the script so i can correct it, if anything is wrong? Also, what do you mean by “going off in some random place”?

2 Likes

Have you tried lerping? It’s like tween but better in a way I guess

2 Likes

You need to modify the weld’s cframe like this

ts:Create(theWeldConnectingDoor,tweeninfo,{C1 = CFrame.new(theWeldConnectingDoor.C1.Position) + Vector3.new(0,-0.33,0.3)}):Play()