Problem with WeldConstraints and Opening Door

Recently, I’ve been working on an opening door. It uses a ProximityPrompt to open/close once you trigger the prompt, and it rotates the door 90 degrees using SetPrimaryPartCFrame. All parts are unanchored and have weld constraints to the Hinge.

The issue is that only two parts aren’t moving with the rest of the door. Those parts are labeled as Problematic Part in the model. I checked to make sure they were the same as the others, however I may be missing something.

Script: (most likely not the cause)

local Prompt = script.Parent
local Door = script.Parent.Parent.Parent
local Hinge = Door.PrimaryPart
local sound = game.Workspace.Door.Handle.Sound

local OpenCloseCooldown = .25

local Debounce = false

local function open()
	for i = 1,18 do
		Door:SetPrimaryPartCFrame(Hinge.CFrame * CFrame.Angles(0,math.rad(5),0))
		wait()
	end
	Prompt.ActionText = "Close"
	sound:Play()
end

local function close()
	for i = 1,18 do
		Door:SetPrimaryPartCFrame(Hinge.CFrame * CFrame.Angles(0,math.rad(-5),0))
		wait()
	end
	Prompt.ActionText = "Open"
end

Prompt.Triggered:Connect(function()
	if Prompt.ActionText == "Open" then
		if not Debounce then
			Debounce = true
			open()
			delay(OpenCloseCooldown,function()
				Debounce = false
			end)
		end
	elseif Prompt.ActionText == "Close" then
		if not Debounce then
			Debounce = true
			close()
			delay(OpenCloseCooldown,function()
				Debounce = false
			end)
		end
	end
end)

Model:

https://www.roblox.com/library/6336743241/Problematic-Door

The script is located in: Door > Handle > ProximityPrompt > Behaviour

Example of behaviour:
https://streamable.com/42kzon

Be sure the part that is not moving is NOT anchored, and remember, weld constraints only work when moving the center part with a tween or setting it’s CFrame, which I believe you are doing. Setting its position does not work.

tldr, have the main part anchored and the other parts unanchored.

That is all already done. Thanks though!

1 Like

I tried the model for myself and everything worked perfectly fine.
Are any of the weld constraints inactive?

This thread has been solved by @aidanisacringe. There were some anchoring issues, sorry for the troubles.