WeldConstraint not updating with tween

I have a Truck model which has a door model that needs to be welded to the PrimaryPart. I did this with a WeldConstraint and it works normally (when manually setting the CFrame of the truck)
However, I need to tween the truck from point A to B, it wont stay with the door. This is weird because every other part works.
The only difference between this door and the other parts is the Hinge part that should connect the door parts to the hinge and hinge to the root, so the door parts still move with the rest of the truck and it can be affected by the handle part, e.g. opening the door.

Current behavior:

Truck setup:
image

3 Likes

Tween the CFrame and not the position. Send your code and I can rewrite it for you.

2 Likes

I am, that’s the issue.

local function DriveIn()
	local DriveInInfo = TweenInfo.new(5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
	local Goal = {CFrame = TruckParked:GetPivot()}
	
	local Tween = TweenService:Create(Truck.PrimaryPart, DriveInInfo, Goal)
	Tween:Play()
end
2 Likes

Can you show your weld properties?

1 Like

This is for the hinge:

This is for one of the door parts:

This is for one of the body parts:

1 Like

Sorry for replying late but the hinge isn’t anchored, right?

2 Likes

Nope

charsrrsrsrsrsrrssrssrrrrssssssss

2 Likes

Try welding the hinge directly to the primary part.

1 Like

It is welded directly to the primary part

1 Like

Clarification:
When it is anchored, it doesnt move (as shown in the video)
When is is unanchored, I cant tween the hinge to rotate
There aren’t any C0 / C1 properties with WeldConstraints that I can use and when I try using Motor6Ds it just doesn’t weld at all (anchored or unanchored)

2 Likes

You have to keep it unanchored, show me your code you use to rotate the door and I can fix it for you.

1 Like

Use a RigidConstraint, Unanchor the Door, and tween the attachments instead

4 Likes

Thanks, this worked perfectly!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.