I welded parts but they don't move when i tween the main part

  1. I made a drawer and it got handles but when i tween the drawer they are not coming together.

  2. Handles doesn’t move.

  3. I tried to unanchor and anchor all the parts but nothing worked

local TweenService = game:GetService("TweenService")
local prompt = script.Parent.Drawer.Prompt.Open
local EndPos = script.Parent.DrawerEnd
local StartPos = script.Parent.Drawer
local Drawer = script.Parent.Drawer
local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0)
local OpenTween = TweenService:Create(Drawer, tweenInfo, {Position = EndPos.Position})
local CloseTween = TweenService:Create(Drawer, tweenInfo, {Position = StartPos.Position})
local Open = false

prompt.Triggered:Connect(function()
	if Open == false then
		OpenTween:Play()
		Open = true
	else
		CloseTween:Play()
		Open = false
	end
end)
1 Like

Hello, are the drawer parts in a group?

1 Like

Tweening is movement through code, instead, for welds, you want movement through physics. So you must use something like body movers or velocities for the weld to move along.

Another solution is to make all the parts that are welded a model and tween the model instead. For model tweening, you should check this code sample.

1 Like

Yes they’re in a group think it’s not the problem i made somme doors before and they were in a group again and working perfectly.

You must tween the CFrame property and not the position property

3 Likes

Use a rigid constraint, and unanchor parts that you want to animate (in this case, unanchor the handle but not the drawer), then just tween the drawer

Thank you it worked perfectly you helped me a lot!

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